mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-12 20:13:59 +02:00
resources: Fix 2 image file cache key issues
* Always include the content hash in the cache key for unprocessed images. * Always include the image config hash in the cache key. This is also a major cleanup/simplification of the implementation in this area. Note that this, unfortunately, forces new hashes/filenames for generated images. Fixes #13273 Fixes #13272
This commit is contained in:
@@ -37,7 +37,7 @@ func (c *ImageCache) getOrCreate(
|
||||
parent *imageResource, conf images.ImageConfig,
|
||||
createImage func() (*imageResource, image.Image, error),
|
||||
) (*resourceAdapter, error) {
|
||||
relTarget := parent.relTargetPathFromConfig(conf)
|
||||
relTarget := parent.relTargetPathFromConfig(conf, parent.getSpec().imaging.Cfg.SourceHash)
|
||||
relTargetPath := relTarget.TargetPath()
|
||||
memKey := relTargetPath
|
||||
|
||||
|
Reference in New Issue
Block a user