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
|