stash/pkg/models
Abdu Dihan 52bd9392fb
Fix stale browser-cached thumbnails after file content changes during scan. (#6622)
* Fix stale thumbnails after file content changes

When a file's content changed (e.g. after renaming files in a gallery),
the scan handler updated fingerprints but did not bump the entity's
updated_at timestamp. Since thumbnail URLs use updated_at as a cache
buster and are served with immutable/1-year cache headers, browsers
would indefinitely serve the old cached thumbnail.

Update image, scene, and gallery scan handlers to call UpdatePartial
(which sets updated_at to now) whenever file content changes, not only
when a new file association is created.
2026-03-02 15:53:02 +11:00
..
json
jsonschema
mocks
paths
custom_fields.go
date.go
date_test.go
doc.go
errors.go
file.go
filename_parser.go
filter.go
find_filter.go
fingerprint.go
fingerprint_test.go
folder.go
fs.go
gallery.go
generate.go
group.go
image.go
import.go
model_file.go
model_folder.go
model_gallery.go
model_gallery_chapter.go
model_group.go
model_image.go
model_joins.go
model_performer.go
model_saved_filter.go
model_scene.go
model_scene_marker.go
model_scene_test.go
model_scraped_item.go
model_scraped_item_test.go
model_studio.go
model_tag.go
orientation.go
package.go
performer.go
query.go
rating.go
rating_test.go
relationships.go
repository.go
repository_blob.go
repository_file.go
repository_folder.go
repository_gallery.go
repository_gallery_chapter.go
repository_group.go
repository_image.go
repository_performer.go
repository_scene.go
repository_scene_marker.go
repository_studio.go
repository_tag.go
resolution.go
saved_filter.go
scene.go
scene_marker.go
search.go
search_test.go
stash_box.go
stash_ids.go
studio.go
tag.go
update.go
update_test.go
value.go