Page caching: clearing cache on data changes
0 reputation · 25 Aug 2023, 16:33 UTC
Goal
When restoring application data from a backup, a developer wants to ensure that previously cached pages reflect the updated state rather than lingering stale DOM content.
Constraints & Uncertainty
Framework7’s Router keeps a page cache to speed transitions, but the documentation does not explicitly state whether this cache is automatically invalidated when the underlying data model is updated or when a backup is restored. If the cache persists unchanged, users may see outdated information until a manual refresh or navigation.
Specific Questions
- Does Framework7 automatically clear or refresh the DOM of cached pages when the data model changes (e.g., after a backup restore)?
- If not, what configuration options or lifecycle hooks (such as
onPageReinitor custom events) can be used to invalidate or rebuild a cached page? - What practical verification steps can confirm that cached pages now display the restored data across different navigation scenarios?