mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 06:00:25 +03:00
parent
8568928aa8
commit
2f721f8ec6
18 changed files with 619 additions and 36 deletions
|
@ -296,9 +296,7 @@ func (r *resourceAdapter) publish() {
|
|||
|
||||
}
|
||||
|
||||
func (r *resourceAdapter) transform(publish, setContent bool) error {
|
||||
cache := r.spec.ResourceCache
|
||||
|
||||
func (r *resourceAdapter) TransformationKey() string {
|
||||
// Files with a suffix will be stored in cache (both on disk and in memory)
|
||||
// partitioned by their suffix.
|
||||
var key string
|
||||
|
@ -307,8 +305,13 @@ func (r *resourceAdapter) transform(publish, setContent bool) error {
|
|||
}
|
||||
|
||||
base := ResourceCacheKey(r.target.Key())
|
||||
return r.spec.ResourceCache.cleanKey(base) + "_" + helpers.MD5String(key)
|
||||
}
|
||||
|
||||
key = cache.cleanKey(base) + "_" + helpers.MD5String(key)
|
||||
func (r *resourceAdapter) transform(publish, setContent bool) error {
|
||||
cache := r.spec.ResourceCache
|
||||
|
||||
key := r.TransformationKey()
|
||||
|
||||
cached, found := cache.get(key)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue