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.

eZ debug

Timing: Jan 18 2025 20:54:28
Script start
Timing: Jan 18 2025 20:54:28
Module start 'layout'
Timing: Jan 18 2025 20:54:28
Module start 'content'
Timing: Jan 18 2025 20:54:29
Module end 'content'
Timing: Jan 18 2025 20:54:29
Script end

Main resources:

Total runtime1.0440 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 588.0625152.6406
Module start 'layout' 0.00700.0030 740.703139.4766
Module start 'content' 0.01001.0322 780.1797623.3281
Module end 'content' 1.04220.0017 1,403.507816.1250
Script end 1.0439  1,419.6328 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.3536160.0002
Check MTime0.00160.1523160.0001
Mysql Total
Database connection0.00100.095010.0010
Mysqli_queries0.964292.3611650.0148
Looping result0.00100.0976630.0000
Template Total0.986994.520.4935
Template load0.00220.210020.0011
Template processing0.984794.323920.4924
Template load and register function0.00010.010210.0001
states
state_id_array0.00090.081510.0009
state_identifier_array0.00100.096820.0005
Override
Cache load0.00180.1713320.0001
Sytem overhead
Fetch class attribute can translate value0.00080.076730.0003
Fetch class attribute name0.00120.116880.0002
XML
Image XML parsing0.00280.267330.0009
class_abstraction
Instantiating content class attribute0.00000.0022100.0000
General
dbfile0.01091.0471320.0003
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs