| 
                                                             Wednesday 03 September 2003 7:13:19 am 
                                                            
                                                                
                                                                 I am implementing cache-blocks in my templates, but am unsure as the best practice to follow. Specifically, I have a product form that is the foundation for hundreds of nodes in the system. I would like to cache each page , but when I place a cache-block around the entire template (which overrides full.tpl) it caches the first item viewed and uses that information when displaying any product. So, if I look at product ABC first, it is cached causing page XYZ to display all of ABC's information. I set up the cache with a key of the node ID as I thought this would guarantee a unique cache key, but apparently not. 
Here is an example of the cache-block code I am using: 
{cache-block keys=$node_id} 
<h1>{attribute_view_gui attribute=$content_version.data_map.page_name}</h1> {/cache-block} Is this a case where I need to use an array for the keys? Paul mentioned this idea in http://ez.no/developer/ez_publish_3/forum/setup_design/implementing_caching_cacheblock_questions but I am not sure if this is solving the question I face. Also, if I do not provide an expiry, does the cache automatically expire at a given time? What am I doing wrong, and what is the best way to ensure pages are cached and as efficient as possible? I'm using 3.1. Thanks in advance! Alex                                                             
                                                                                                                            Alex 
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ] 
 
<i>When in doubt, clear the cache.</i>
                                                                 
                                                                                                                     |