Forums / General / Cache Problem

Cache Problem

Author Message

John Smith

Thursday 06 November 2008 1:55:46 am

Hi,

Yesterday I wrote the following code with is overriding the full folder template.

{let 
parent=fetch('content','node',hash('node_id',$node.path_array.3))
grandparent=fetch('content','node',hash('node_id',$node.path_array.4)) }
{let children=fetch( content, list, hash( parent_node_id, $node.path_array.4, class_filter_type,  include, class_filter_array, array( 'folder', 'article' ), sort_by, $grandparent.sort_array ) )}

-----
-----
-------

But the problem is when I am changing the prioities of the items in the folder, I am not getting the same result untill I clear the cache. This is quite annoying.

I fixed it by writting the follwoing line before the code.

{set-block scope=root variable=cache_ttl}0{/set-block}

Is this is right solution?

Ɓukasz Serwatka

Thursday 06 November 2008 11:47:00 am

Hi,

View cache is cleared on set priority action for current content object. Make sure that RelatedSiteAccessList contains correct siteaccesses. If you set it in the admin interface siteaccess then public siteaccess should be on that list to. Disabling view cache in general is bad idea. If you still can't make it work set cache expiry time to e.g 3 or 5 min.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog