Cache-block ignore_content_expiry directive

Author Message

Piotrek Karaś

Monday 12 May 2008 7:12:53 am

Hello there,

I've got few detailed questions concerning cache-block function's ignore_content_expiry directive:

1) In what cache-block function's parameter combinations/contexts is ignore_content_expiry expected to work? Are there any param combinations that ignore this flag? Of course, I do not mean a situation when a block is expired based on expiry or subtree_expiry parameters.

2) Do I understand it correctly that since cache-blocks store the resulting XHTML code, there is no middle way between a generated and ungenerated cache-block? In other words, it is impossible to have any partial cache-block expiry - the block either gets generated from scratch or gets retrieved, right?

I have reasons to believe, that the subtree_expiry patch:
http://issues.ez.no/IssueView.php?Id=12175&activeItem=2
solves subtree_expiry problem, but causes ignore_content_expiry one. I've already submitted this as a bug, but it still may be my mistake, so I would be grateful if you could share your experiences with ignore_content_expiry param.

Thanks,
Piotrek

--
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

Kristof Coomans

Tuesday 13 May 2008 2:27:01 am

Hi Piotrek

1) ignore_content_expiry is supposed to work with all combinations, except for when you use subtree_expiry then the flag is ignored as you mention yourself

2) yes, your understanding is correctly, however afaik when you have a cache block inside a cache block and the outer cache block gets expired it will use the inner cache block's generated content if it is not expired

btw, discovered yet another bug: when template compilation is disabled, using expiry=0 will always expire the cache block, while http://ez.no/doc/ez_publish/technical_manual/4_0/reference/template_functions/miscellaneous/cache_block says "A value of zero will produce a cache block that will never expire."

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Piotrek Karaś

Tuesday 13 May 2008 7:57:25 am

Kristof,

<i>1) ignore_content_expiry is supposed to work with all combinations, except for when you use subtree_expiry then the flag is ignored as you mention yourself</i>

Let clear it up - I would expect, that cache-block parameters work as follows:

<b>ignore_content_expiry:</b> Can be used with any combination of params and simply makes sure, that whenever an object is published, this particular block will not expire <b>unless</b> it matches subtree_expiry or expiry condition (in other words, ignore_content_expiry will not prevent subtree_expiry or expiry from their regular behavior).

<b>expiry:</b> Will always be cleared when expired, or if any other condition matches. If only expiry param is used, the block <b>will</b> be expired by any object publishing.

<b>subtree_expiry:</b> Will always be cleared when a given subtree is modified and published, or if any other condition matches. If subtree_expiry is the only param that is used, the block <b>will not</b> be expired by random object publishing.

<i>2) yes, your understanding is correctly, however afaik when you have a cache block inside a cache block and the outer cache block gets expired it will use the inner cache block's generated content if it is not expired</i>

Yup, that's what I would expect. What's the extent of cache-block nesting allowed?

I'll do more testing tonight.

Thanks for feedback,
Cheers.

--
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

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 31 2025 04:26:45
Script start
Timing: Jan 31 2025 04:26:45
Module start 'layout'
Timing: Jan 31 2025 04:26:45
Module start 'content'
Timing: Jan 31 2025 04:26:45
Module end 'content'
Timing: Jan 31 2025 04:26:45
Script end

Main resources:

Total runtime0.0141 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.0045 588.2656151.2266
Module start 'layout' 0.00450.0022 739.492236.6797
Module start 'content' 0.00670.0059 776.171994.1875
Module end 'content' 0.01260.0014 870.359437.9922
Script end 0.0140  908.3516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002114.7265140.0001
Check MTime0.00106.8792140.0001
Mysql Total
Database connection0.00074.785610.0007
Mysqli_queries0.002215.757230.0007
Looping result0.00000.078010.0000
Template Total0.00117.710.0011
Template load0.00085.936710.0008
Template processing0.00021.705410.0002
Override
Cache load0.00043.163310.0004
General
dbfile0.001913.804380.0002
String conversion0.00000.039040.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