Forums / Developer / Always process a part of code despite view cache
Paul Etienney
Tuesday 01 June 2010 11:25:38 am
Hello again,
I am sure this question is already answered but i can't find the solution.
My view-cache and template-cache are enabled. I need to process my own operator each time a page is loaded despite the view-cache. I want the rest of the page to be cached.
I tried many things. The most logicial to me was to do this :
{cache-block expiry=1} {myownoperator()}{/cache-block}
But it does not work. Any idea ?
-- Good websites creation -- My site : http://www.pauletienney.com Twitter : http://www.twitter.com/p_etienney
Gaetano Giunta
Tuesday 01 June 2010 2:12:09 pm
1 - hackish way: put your operator in the pagelayout, percolate its results down the page into the node view via javascript (if it non security-sensitive it is often a good idea)
2 - proper way:
- set a cache_tll=0 (or 1) on node template
- add a cache block not around your own operator but around the rest of the page
hope it helps
Principal Consultant International Business Member of the Community Project Board