Forums / Developer / Cache-block ignore_content_expiry directive

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

eZ debug

Timing: Jan 31 2025 04:35:44
Script start
Timing: Jan 31 2025 04:35:44
Module start 'content'
Timing: Jan 31 2025 04:35:44
Module end 'content'
Timing: Jan 31 2025 04:35:44
Script end

Main resources:

Total runtime0.2724 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 588.0625180.8125
Module start 'content' 0.00560.0056 768.875097.9297
Module end 'content' 0.01120.2612 866.8047527.3750
Script end 0.2724  1,394.1797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00321.1656200.0002
Check MTime0.00140.4964200.0001
Mysql Total
Database connection0.00080.282010.0008
Mysqli_queries0.227183.35221410.0016
Looping result0.00120.44181390.0000
Template Total0.260995.810.2609
Template load0.00080.295910.0008
Template processing0.260195.453510.2601
Override
Cache load0.00060.209210.0006
Sytem overhead
Fetch class attribute can translate value0.00070.264310.0007
XML
Image XML parsing0.00030.102710.0003
General
dbfile0.00652.3755200.0003
String conversion0.00000.001530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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