Cache expiry after new content being published

Author Message

Piotrek Karaś

Thursday 19 April 2007 1:00:04 pm

Hello there,

I do realize, that similar questions might have been asked before, but cache issues seems to have been the most troublesome issue of eZ publish, judging by the amount topics the search returns... After some time I just gave up...

The best way I have so far discovered to measure and observe the installation's efficiency when it comes to cache tasks is to display the debug information below the pagelayout and check the amount (or time) of SQL queries. When we clear the entire cache, our sites generate up to 200 of queries (by the way - is that common?), but then each next request only needs just a few (up to 10), depending on which pagelayout parts we decided to leave uncached. It all goes ok until next piece of content is published - no matter where in the content structure menu - it causes the template to require almost the initial amount of queries to be sent again, just before it gets cached again.

I don't expect any detailed info here. Just would like to know if it is a regular eZ publish behavior to expire most of its cache when new content is published? Or is it just my misconfiguration or bad planning?

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

André R.

Friday 20 April 2007 4:05:34 am

Hi!

Take a read on:
http://ez.no/doc/ez_publish/technical_manual/3_8/reference/template_functions/miscellaneous/cache_block

On cache blocks that don't have to expire right away when new content is published I would recommend using 'expiry' in combination with 'ignore_content_expiry'.

For content that should expire on publish, you can fine tune it with 'subtree_expiry' to make it only expire on specific subtrees.

Both of these could and should be combined with 'keys' of course, if you have variables that are used inside the block.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

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 19 2025 04:21:55
Script start
Timing: Jan 19 2025 04:21:55
Module start 'layout'
Timing: Jan 19 2025 04:21:55
Module start 'content'
Timing: Jan 19 2025 04:21:55
Module end 'content'
Timing: Jan 19 2025 04:21:55
Script end

Main resources:

Total runtime0.0193 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 590.4219152.6406
Module start 'layout' 0.00660.0036 743.062539.4922
Module start 'content' 0.01020.0066 782.554789.3672
Module end 'content' 0.01680.0024 871.921934.3047
Script end 0.0192  906.2266 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002713.8455140.0002
Check MTime0.00126.2726140.0001
Mysql Total
Database connection0.00136.763010.0013
Mysqli_queries0.003317.323030.0011
Looping result0.00000.083010.0000
Template Total0.00199.610.0019
Template load0.00105.080010.0010
Template processing0.00094.535110.0009
Override
Cache load0.00073.532010.0007
General
dbfile0.00147.273280.0002
String conversion0.00000.043340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs