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.