Skip to content

Commit f693135

Browse files
committed
feat: invalidate cache when srcset config changes
1 parent a44454b commit f693135

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

classes/Imagex.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ private function getDynamicSrcsetPreset(string|null $ratio = null, File|null $im
159159
// Cache settings
160160
$version = $this->kirby->plugin('timnarr/imagex')->version();
161161
$cache = $this->kirby->cache('timnarr.imagex');
162-
$cacheKey = implode('-', [$version, $ratioX, $ratioY, $this->srcsetName]);
162+
$cacheKey = implode('-', [$version, $ratioX, $ratioY, json_encode($srcsetPreset)]);
163163
$cacheId = 'srcset-config-' . hash('xxh3', $cacheKey);
164164

165165
// Get srcsetPreset from cache or set it

0 commit comments

Comments
 (0)