Is your feature request related to a problem? Please describe.
Alchemy already supports disabling page caching per page layout with cache: false, but some pages may contain only one dynamic or permission-sensitive element while the rest of the layout should remain generally cacheable.
When such an element is present on a page, Alchemy should be able to skip page caching for that request, while still allowing the element partial to use its own fragment caching strategy.
I want to propose a new element definition option such as:
- name: restricted_downloads
page_cache: false
Use case: an element renders different output depending on the current user’s permissions. If the whole page is considered fresh, the element partial is never executed, so its own fragment cache key cannot take effect. An element-level page-cache opt-out solves this without disabling page caching for all pages with that page layout.
I have been testing the described patch on a production server and its been working well for me. Would you accept a PR if I'd sent this upstream?
Is your feature request related to a problem? Please describe.
Alchemy already supports disabling page caching per page layout with
cache: false, but some pages may contain only one dynamic or permission-sensitive element while the rest of the layout should remain generally cacheable.When such an element is present on a page, Alchemy should be able to skip page caching for that request, while still allowing the element partial to use its own fragment caching strategy.
I want to propose a new element definition option such as:
Use case: an element renders different output depending on the current user’s permissions. If the whole page is considered fresh, the element partial is never executed, so its own fragment cache key cannot take effect. An element-level page-cache opt-out solves this without disabling page caching for all pages with that page layout.
I have been testing the described patch on a production server and its been working well for me. Would you accept a PR if I'd sent this upstream?