Skip to content

v3.0.23: feat(gallery): implement video caching and media cache eviction

Choose a tag to compare

@github-actions github-actions released this 07 Jul 15:15
· 21 commits to main since this release
- Introduce MediaCacheEvictor to handle best-effort cleanup of disk-cached
  media. This utility is used in PagedFilesNotifier to remove local
  cache entries for files that have been deleted server-side, preventing
  orphaned data from consuming storage.
- Update ThumbCacheManager and FullImageCacheManager configurations.
  Increased the object limit for FullImageCacheManager from 50 to 500 to
  support better gallery preloading and extended the stale period for
  both managers.
- Add VideoCacheManager to manage video disk caching with a conservative
  capacity of 60 objects, considering the larger file sizes of videos.
- Implement video pre-caching in GalleryScreen, triggered by
  nearby-slide preloading. Added _videoPreloadRadius to limit bandwidth
  usage by prefetching only the immediate next video.
- Modify k_gallery vendor components (KGallery, GalleryImageViewer, and
  GalleryVideoItem) to support an optional VideoCacheManager. This
  enables videos to be downloaded once and played from a local file
  subsequent times instead of re-streaming, significantly improving
  playback responsiveness.
- Update GalleryVideoItem._openMedia to handle the local caching logic,
  falling back gracefully to network streaming if the cache file cannot be
  retrieved or if the cache manager is unavailable.