Movielogr - Track What You Watch

« Back to Changelog

v4.0.3 Fixes caching issues

v4.0.3   October 4, 2026

In some instances, primarily the overview page and the poster strip on members stats pages, were showing stale data because caching was incorrectly invalidated. This update fixes those caching issues.


Details

Prefix-based cache clearing never matched any files because it used the incorrect key prefix, so Overview/Members/search pages stayed stale for up to 4 hours after adding or editing movies.

  • Add CacheInvalidator library (Services::cacheInvalidator()) that clears key groups via deleteMatching() with the configured prefix
  • Move clearCache() from AdminBaseController to BaseController and delegate to the library
  • Invalidate on write paths that never cleared cache: member add-to-list, add-to-event, comments, site admin user edit/delete, duplicate title update/delete actions, and the processDuplicates cron
  • List/event edits now also clear search results, which include them
  • Updater clears the per-title detail key on every update, and the full Overview when a logged title's poster is added, replaced or has stale copies removed (avoids missing/broken posters without wiping caches on every 5-minute cron run)
  • Hash cert in Overview cache keys and validate member year/month URL segments (404 on bad input); a : in these segments caused 500s because it is reserved in cache keys, and a non-numeric month crashed DateTime