cache-block with subtree_expiry and CacheDir problem

Author Message

Marko Žmak

Friday 14 July 2006 7:46:07 am

On my eZ installation I have separated cache directories for my user siteacces and my admin siteaccess. I have a cache-block that has a subtree_expiry parameter. When I publish an object below the node set in the subtree_expiry parameter the cache-block in the user site is not cleared. But if I set the admin and user siteacces to use the same CacheDir, then it is cleared.

So the conclusio is that subtree_expiry work only when the two siteaccesses have the same cache dir. Is there a way around it? I really need having my admin and user cache separated. Is there some ini setting that can control this?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Kristian Hole

Friday 14 July 2006 2:56:12 pm

On my eZ installation I have separated cache directories for my user siteacces and my admin siteaccess. 

Don't!

The caches are stored in the var-dir, and when you are publishing something from the admin interface, it does not clear it correctly if you are using different var dirs.

The rule is:
If you are using the same database in two siteaccesses, the var-dirs must be the same.

Edit:
Why would you like have the var-dirs separated?

Cheers,
Kristian

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Marko Žmak

Sunday 16 July 2006 2:40:46 pm

I have one sitteaccess for the eZ admin interface, one siteaccess for the public, and one siteaccess for testing and doing part of developement.

So when I'm testing I have to clear cache from time to time (which can be very often), but I want only to clear the cache for the test siteaccess and not for the public. That's why my admin and test siteaccess have to have the same CacheDir folder which is different from cache dir for user siteaccess.

Is there any way to tell eZ for which siteaccess to clear the cache-block cache when publishing an object?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Łukasz Serwatka

Sunday 16 July 2006 11:21:26 pm

Is there any way to tell eZ for which siteaccess to clear the cache-block cache when publishing an object?

No, this is not possible.

On Linux you can use somehing like to find and remove the exact template block:

cd var/<siteaccess>/cache/template-block && grep -lr "unique of the template-block" *|xargs rm -f

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

Marko Žmak

Sunday 16 July 2006 11:56:25 pm

Thanks for the tip Lukasz, but that's not what I need. I need the cache of the user site to be cleared every time an object is published or deleted.

Wouldn't it be usefull if you could setup by an INI setting what siteaccess templae-block should be cleared when publishing an object?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.