Author
|
Message
|
Jacks JNK
|
Monday 17 November 2008 2:48:51 am
Indeed, I want to change each node of a parent's "articles" that the cache is emptied
{cache-block subtree_expiry='/PARENT'}
{def $articles=fetch( content, list,hash(parent_node_id,239,limit,5,
class_filter_type,'include',
class_filter_array,array('article'),
'sort_by',array('published',true())) )}
{foreach $articles as $article}
<div class="menu1">
<a href={$article.url_alias|ezurl}>{$article.name}</a>
</div>
{/foreach}
{undef $articles}
{/cache-block }
Skype : jacks_ngala
|
André R.
|
Monday 17 November 2008 7:15:07 am
Use the node id instead, less prone for errors. {cache-block subtree_expiry=239}
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
|
Jacks JNK
|
Tuesday 18 November 2008 12:40:51 am
it does not work !
Skype : jacks_ngala
|
Piotrek Karaś
|
Tuesday 18 November 2008 8:23:39 pm
I've never seen/heard of this /PARENT option. Has it ever worked? If so, how does it work for non-node templates?
--
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
|
Jacks JNK
|
Thursday 20 November 2008 2:06:06 am
no, it's just an illustration
Skype : jacks_ngala
|
André R.
|
Thursday 20 November 2008 5:53:19 am
what version are you on? There is a bug in 4.0(and 3.10) that was fixed in 4.0.1 in regards to this. @Piotrek: Do you remember witch issue? I remember you and kc identified it and made some test cases.
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
|
Jacks JNK
|
Thursday 20 November 2008 6:14:58 am
I have version 4.0.1 I think this bug persists until now !!!!
Skype : jacks_ngala
|
Piotrek Karaś
|
Thursday 20 November 2008 6:29:44 am
So far we haven't seen any weird behavior from cache-blocks in 4.0.1 (or since 4.0.0 patch). Meanwhile, I only joined this thread because I thought there was a cache-block feature that I hadn't known about. But that's not the case. So before we rush into solving the problem, could we please have problem explained once again? Because I sincerely have no idea what Jacks' problem is and what he/she is trying to accomplish. Especially, I don't understand that parent reference...
--
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
|
Jacks JNK
|
Thursday 20 November 2008 6:42:24 am
The parent is just the name of the attribute (node) containing my articles on what I am used cache. example: You have an object "ARTICLES" and children "Article 1, Article 2 ,...) published in" ARTICLES ". So it has nothing with the internal workings of eZ
Skype : jacks_ngala
|
Piotrek Karaś
|
Thursday 20 November 2008 6:48:44 am
Well, that part is clear. Now what are you trying to achieve and how is cache related?
--
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
|
Jacks JNK
|
Thursday 20 November 2008 6:56:53 am
I want enabled the cache-block which will expire when an object is published or modified in the parent node.
Skype : jacks_ngala
|
Piotrek Karaś
|
Thursday 20 November 2008 7:14:43 am
Still, to few details. For example - if you're trying to put those cache-blocks inside node templates - have you disabled viewcache? Anyways, here you'll find my tests: http://issues.ez.no/12175 And here's a newer version:
{def $subtree_expiry_node_id=61}
{def $expiry_seconds=60}
<table>
<tr><th colspan="2">Current time: {currentdate()|datetime( 'custom', '%Y-%m-%d %H:%i:%s' )}, Expiry={$expiry_seconds}, Subree expiry={$subtree_expiry_node_id}</th></tr>
<tr><th>STANDARD</th><th>WITH KEYS</th></tr>
<tr><td>
{cache-block expiry=0}
{currentdate()|datetime( 'custom', '%Y-%m-%d %H:%i:%s' )} {ldelim}cache-block expiry=0{rdelim}
{/cache-block}
</td><td>
{cache-block expiry=0 keys=array( $uri_string )}
{currentdate()|datetime( 'custom', '%Y-%m-%d %H:%i:%s' )} {ldelim}cache-block expiry=0 keys=array( $uri_string ){rdelim}
{/cache-block}
</td></tr><tr><td>
{cache-block ignore_content_expiry expiry=0}
{currentdate()|datetime( 'custom', '%Y-%m-%d %H:%i:%s' )} {ldelim}ignore_content_expiry expiry=0{rdelim}
{/cache-block}
</td><td>
{cache-block ignore_content_expiry expiry=0 keys=array( $uri_string )}
{currentdate()|datetime( 'custom', '%Y-%m-%d %H:%i:%s' )} {ldelim}ignore_content_expiry expiry=0 keys=array( $uri_string ){rdelim}
{/cache-block}
</td></tr><tr><td>
{cache-block expiry=$expiry_seconds}
{currentdate()|datetime( 'custom', '%Y-%m-%d %H:%i:%s' )} {ldelim}expiry={$expiry_seconds}{rdelim}
{/cache-block}
</td><td>
{cache-block expiry=$expiry_seconds keys=array( $uri_string )}
{currentdate()|datetime( 'custom', '%Y-%m-%d %H:%i:%s' )} {ldelim}expiry={$expiry_seconds} keys=array( $uri_string ){rdelim}
{/cache-block}
</td></tr><tr><td>
{cache-block ignore_content_expiry expiry=$expiry_seconds}
{currentdate()|datetime( 'custom', '%Y-%m-%d %H:%i:%s' )} {ldelim}ignore_content_expiry expiry={$expiry_seconds}{rdelim}
{/cache-block}
</td><td>
{cache-block ignore_content_expiry expiry=$expiry_seconds keys=array( $uri_string )}
{currentdate()|datetime( 'custom', '%Y-%m-%d %H:%i:%s' )} {ldelim}ignore_content_expiry expiry={$expiry_seconds} keys=array( $uri_string ){rdelim}
{/cache-block}
</td></tr><tr><td>
{cache-block subtree_expiry=$subtree_expiry_node_id}
{currentdate()|datetime( 'custom', '%Y-%m-%d %H:%i:%s' )} {ldelim}subtree_expiry={$subtree_expiry_node_id}{rdelim}
{/cache-block}
</td><td>
{cache-block subtree_expiry=$subtree_expiry_node_id keys=array( $uri_string )}
{currentdate()|datetime( 'custom', '%Y-%m-%d %H:%i:%s' )} {ldelim}subtree_expiry={$subtree_expiry_node_id} keys=array( $uri_string ){rdelim}
{/cache-block}
</td></tr><tr><td>
{cache-block subtree_expiry=$subtree_expiry_node_id expiry=$expiry_seconds}
{currentdate()|datetime( 'custom', '%Y-%m-%d %H:%i:%s' )} {ldelim}subtree_expiry={$subtree_expiry_node_id} expiry={$expiry_seconds}{rdelim}
{/cache-block}
</td><td>
{cache-block subtree_expiry=$subtree_expiry_node_id expiry=$expiry_seconds keys=array( $uri_string )}
{currentdate()|datetime( 'custom', '%Y-%m-%d %H:%i:%s' )} {ldelim}subtree_expiry={$subtree_expiry_node_id} expiry={$expiry_seconds} keys=array( $uri_string ){rdelim}
{/cache-block}
</td></tr></table>
As far as I can see - things work fine.
--
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
|