diff options
author | Bjørn Erik Pedersen <[email protected]> | 2019-08-13 12:35:04 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2019-08-13 18:09:46 +0200 |
commit | cd575023af846aa18ffa709f37bc70277e98cad3 (patch) | |
tree | b3eb6fcd3ab7b9073699df0486210cec00f877a1 /resources/transform.go | |
parent | 6315098104ff80f8be6d5ae812835b4b4079582e (diff) | |
download | hugo-cd575023af846aa18ffa709f37bc70277e98cad3.tar.gz hugo-cd575023af846aa18ffa709f37bc70277e98cad3.zip |
Improve the server assets cache invalidation logic
Fixes #6199
Diffstat (limited to 'resources/transform.go')
-rw-r--r-- | resources/transform.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/resources/transform.go b/resources/transform.go index 6a188e789..379452bb7 100644 --- a/resources/transform.go +++ b/resources/transform.go @@ -330,14 +330,13 @@ func (r *transformedResource) transform(setContent, publish bool) (err error) { if p == "" { panic("target path needed for key creation") } - partition := ResourceKeyPartition(p) - base = partition + "/" + p + base = ResourceCacheKey(p) default: return fmt.Errorf("transformation not supported for type %T", element) } } - key = r.cache.cleanKey(base + "_" + helpers.MD5String(key)) + key = r.cache.cleanKey(base) + "_" + helpers.MD5String(key) cached, found := r.cache.get(key) if found { |