Saturday 06 October 2007 5:09:50 am
Hello,
we have some caching problems on our sites I wanted to solve with
Smart View Caching. Unfortunately this did not work out as expected. It is a fairly standard situation with news items buried somewhere in the storage hierarchy but supposed to show up on the homepage as well. I put the following lines in the viewcache.ini.append.php of the admin siteaccess of the site (using the admin siteaccess is the right place, isn't it):
[ViewCacheSettings] SmartCacheClear=enabled
[lmi_news]
AdditionalObjectIDs[] AdditionalObjectIDs[]=14877 'lmi_news' is of course the class identifier of the news objects. 14877 is the node id of the homepage. According to the documentation I think this should work. Being unsure i tried the following block as well:
[lmi_news]
DependentClassIdentifier[]
DependentClassIdentifier[]=lmi_startpage
ClearCacheMethod[]
ClearCacheMethod[]=object
ClearCacheMethod[]=parent
AdditionalObjectIDs[] AdditionalObjectIDs[]=14877
This did not change anything however. The news show up in the corresponding folder but not on the homepage. The pagelayout.tpl has two cache blocks with keys=$module_result.uri. The template of the actual homepage has no cache blocks at all. However i tried to set the TTL with {set-block scope=root variable=cache_ttl}0{/set-block} as proposed in the thread http://ez.no/developer/forum/developer/view_cache_trouble. I am unsure about how and when to make use of Smart View Caching in general and how it corresponds with cache blocks and the TTL. For instance the documentation says that cache-blocks are meant to be used in pagelayout.tpl but it might be used in other templates as well. I don't understand how cache-blocks relate to view caching, smart view cache cleaning and vice versa. I think I read most of the documentation but I still can't get it to work.
Thanks for your help Oliver
|