Skip to content

[_] feature/Added Photos thumbnail cache invalidation and refresh - #566

Merged
CandelR merged 2 commits into
masterfrom
feature/refresh-Photos-thumbnails
Aug 7, 2026
Merged

[_] feature/Added Photos thumbnail cache invalidation and refresh#566
CandelR merged 2 commits into
masterfrom
feature/refresh-Photos-thumbnails

Conversation

@CandelR

@CandelR CandelR commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Added thumbnail cache invalidation and refresh for local and cloud assets

Summary

  • PhotosScreen/types.ts, photoTimelineGroups.ts: added modificationTime to PhotoItem, sourced from the same MediaLibrary.Asset field the sync layer already uses to detect edits.
  • PhotoItem.tsx: the grid's ExpoImage now keys its cache on ${id}-${modificationTime} instead of just the URI (which iOS doesn't change on edit).
  • PhotoCloudBrowser.ts: picks the most recently created thumbnail instead of blindly using thumbnails[0], and evicts the orphaned cached thumbnail file from disk when a file's thumbnail bucket changed.
  • cloud_asset.ts: the cloud asset upsert now nulls the cached thumbnail_path when thumbnail_bucket_file changed, so stale local caches get invalidated instead of persisted forever.
  • database/photosLocalDB.ts: new getCachedThumbnailRefs batch lookup, plus a shared buildInClausePlaceholders helper reused across the existing chunked queries.

@CandelR
CandelR requested a review from larryrider August 6, 2026 14:33
@CandelR CandelR self-assigned this Aug 6, 2026
@CandelR CandelR added the enhancement New feature or request label Aug 6, 2026
@CandelR
CandelR force-pushed the feature/refresh-Photos-thumbnails branch from 961ab7b to eb7b959 Compare August 6, 2026 14:36
Base automatically changed from feature/PB-6068-photos-backup to master August 7, 2026 11:41
@CandelR
CandelR force-pushed the feature/refresh-Photos-thumbnails branch from 9e59fdd to b85c7cb Compare August 7, 2026 11:41
@CandelR
CandelR merged commit 938bcb0 into master Aug 7, 2026
1 check passed
@CandelR
CandelR deleted the feature/refresh-Photos-thumbnails branch August 7, 2026 11:42
@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants