Improve the server assets cache invalidation logic

Fixes #6199
This commit is contained in:
Bjørn Erik Pedersen
2019-08-13 12:35:04 +02:00
parent 6315098104
commit cd575023af
8 changed files with 206 additions and 50 deletions

View File

@@ -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 {