This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » General » Cache Expiry - prevent global expiry...

Cache Expiry - prevent global expiry every time you publish

Cache Expiry - prevent global expiry every time you publish

Monday 08 December 2003 9:26:52 am - 1 reply

I know a lot of us who loves the possibilites of eZ Publish still struggle with performance. I've been ready to put my site into production for some time now, but the load time takes to long due to global expiry of cache every time I publish something new, and also due to the fact that my webhost provider doesn't support either php acceleration or httrack for static mirroring. I'm still working on them to see the light so that I can test out tools like eZ Sitecopier of Denis Braekhus:

Of course I've been experimenting with expiry-variable of cache-block :

If you don't specify the expiry parameter eZ publish will automatically expire the cache block in two hours or if any content is published. This means that if you publish anything on your site all cache-blocks will be expired.

If this expiry does not fit your needs you can specify the expiry time manually in seconds.

Example (expire after 120s):
{cache-block expiry=120}
... tpl code

NOTE: it's not possible to say that a cache-block should not expire even if any content is published (yet). "

..and I've also looked into using the {set-block scope=root variable=cache_ttl}7200{/set-block} -line on top of my tpls such as folder.tpl and article.tpl.. Didn't do the trick still...

Now I've heard this little trick (haven't tried it out yet, will do shortly):

Comment out the line (142) in
$expiryTime = max( $localExpiryTime, $globalExpiryTime );

..and the cache blocks will not be emptied when publishing content. Instead the expiry parameter can be used to define the life span of the cache files. I'm trying out this approach now.

Of course, I'd love to hear others experiences when it comes to speeding up eZ Publish without the possibility of static mirroring. happy.gif Emoticon

By the way, I'm currently running ver 3.2-2 of eZ Publish on Linux/MySql.

Modified on Monday 08 December 2003 9:32:39 am by Valentin Svelland

Tuesday 20 January 2004 4:30:48 pm

Just a note, the cache block function has a ignore_content_expiry option which does not expire template block cache when any content is published.

Updated doc at:



You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from