Standard apologies that I couldn't find an answer - which must already exist - by searching the forum.
I have caching enabled on a particular macro as well as "Per Page". For most pages, 3600 seconds is perfectly fine since the macro isn't rendering so much content. Imagine a directory and I'm caching the category pages.
For one page in particular, I'd like the duration to be much longer since the content is much greater. Imagine a directory and I'm caching a "View All Listings" page.
Is there a way to cache a single node for a different duration than other nodes using the same macro?
There isn't a way to define a different cache periods (based on node) for the same macro. You would either need to increase the cache period across on that macro (which affects all pages), or create a separate macro specifically for the instance that you want a longer cache period. (But that would mean an extra template for a reference to that macro, etc)
Cache Duration by Page
Standard apologies that I couldn't find an answer - which must already exist - by searching the forum.
I have caching enabled on a particular macro as well as "Per Page". For most pages, 3600 seconds is perfectly fine since the macro isn't rendering so much content. Imagine a directory and I'm caching the category pages.
For one page in particular, I'd like the duration to be much longer since the content is much greater. Imagine a directory and I'm caching a "View All Listings" page.
Is there a way to cache a single node for a different duration than other nodes using the same macro?
Thanks!
Hi Shmuel,
There isn't a way to define a different cache periods (based on node) for the same macro. You would either need to increase the cache period across on that macro (which affects all pages), or create a separate macro specifically for the instance that you want a longer cache period. (But that would mean an extra template for a reference to that macro, etc)
Cheers, Lee.
is working on a reply...