mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
f2df9cb93a
Three bugs causing storage preview cache to be ineffective: 1. Cache keys included the `token` auth parameter, so requests using resource tokens always generated unique keys and never hit cache. Introduced `cache.params` label for routes to opt-in specific params into the cache key; preview now declares only the transform params. 2. Cache hits never refreshed `accessedAt` in the DB or the filesystem file mtime, because `$response->send()` in the init hook skips the shutdown hook. After 30 days the maintenance job evicted still-active cache entries, and after the original 30-day filesystem TTL the cache file expired — causing periodic full re-renders. The cache-hit path now updates both on the APP_CACHE_UPDATE (24h) interval. 3. `updateDocument` in the preview action passed the full file document instead of a sparse one when updating `transformedAt`. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>