Apache Web Server and Yunohost Core – Cache Invalidation Interoperability Question
23.3K reputation · 18 Feb 2023, 11:01 UTC
Apache Web Server and Yunohost Core – Cache Invalidation Interoperability Question
When an application on Yunohost is updated or its configuration changes, the Apache mod_cache module may continue to serve stale static or dynamic content until the TTL expires. Yunohost’s global "clear cache" button purges all cache entries, but it offers no per‑application granularity and can be slow for large sites.
The goal is to establish a reliable mechanism that automatically or manually invalidates cache entries belonging to a specific Yunohost app immediately after an update, without affecting unrelated applications.
Constraints include:
- Yunohost ships with mod_cache and mod_cache_disk enabled by default, but does not expose per‑app cache control.
- Admin UI only provides a system‑wide purge, not an API for individual apps.
- Custom .htaccess rules may define cache directives that the global purge does not respect.
Unresolved decision: Should Yunohost expose a per‑application cache flush API that translates to mod_cache purge directives?
Specific questions:
- What is the current mechanism for mapping a Yunohost app’s static files to mod_cache cache keys, and can it be programmatically targeted?
- Can a custom hook be added to Yunohost’s app‑update lifecycle that triggers a mod_cache purge for only that app’s URLs?
- How would a per‑app purge interact with existing .htaccess cache rules and with external reverse proxies like Varnish if present?