feat: use real image path to calculate cache key

This commit is contained in:
Oleg Lobanov committed 2022-02-21 19:59:22 +01:00
1 parent cf85404dd2
commit c1987237d0
3 files changed
+18 -5

No files matched your search

+1 -1
View File
@@ -283,7 +283,7 @@ func writeFile(fs afero.Fs, dst string, in io.Reader) (os.FileInfo, error) {
func delThumbs(ctx context.Context, fileCache FileCache, file *files.FileInfo) error {
for _, previewSizeName := range PreviewSizeNames() {
size, _ := ParsePreviewSize(previewSizeName)
if err := fileCache.Delete(ctx, previewCacheKey(file.Path, file.ModTime.Unix(), size)); err != nil {
if err := fileCache.Delete(ctx, previewCacheKey(file, size)); err != nil {
return err
}
}