Forums / Developer / EzFlow bloc and view cache.

EzFlow bloc and view cache.

Author Message

SEBBANE Alexandre

Monday 05 January 2009 1:33:26 am

hello,

my ezpublish version is 4.0.1.

i have a block "Actualité" which mean news in french

[Actualites]
Name=Actualites (dynamic)
NumberOfValidItems=3
NumberOfArchivedItems=5
ManualAddingOfItems=disabled
FetchClass=ezflowlatestobjects
FetchFixedParameters[]
FetchFixedParameters[Class]=actualite
FetchParameters[]
FetchParameters[Source]=nodeID
# Single / Multiple
FetchParametersSelectionType[Source]=single
FetchParametersIsRequired[]
# True / False
FetchParametersIsRequired[Source]=true
ViewList[]=actualite_standard
ViewList[]=actualite_items
ViewList[]=actualite_list
ViewName[actualite_standard]=liste d actualité standard
ViewName[actualite_items]=liste d actualite complete
ViewName[actualite_list]=liste d actualite simple
 

the template of this block is

{def $block_name = ''}
{def $fetch_params = unserialize( $block.fetch_params )}
{def $rubrique_node=fetch( 'content', 'node', hash( 'node_id', $fetch_params['Source'] ) )}

{if is_set( $block.name )}
    {set $block_name = $block.name}
{else}
    {set $block_name = ezini( $block.type, 'Name', 'block.ini' )}
{/if}
<div class="homeblock_white">
    <h1>{$block.name}</h1>
    <div class="block_content">
	{node_view_gui view=line content_node=$block.valid_nodes[0]}
	{node_view_gui view=encartline content_node=$block.valid_nodes[1]}
	{node_view_gui view=encartline content_node=$block.valid_nodes[2]}
    </div>
    <div class="block_action">
        <ul>
            <li><a href={$rubrique_node.url_alias|ezurl} class="archive">{$rubrique_node.name|wash}</a></li>
        </ul>
    </div>
</div>
 

As you can see there is no cache block, but i have a cache....

do i have to do something in order to have the new news when i publish them ?

thank in advance.

Paris, France

André R.

Monday 05 January 2009 10:08:07 am

You should take a look in settings/viewcache.ini for how you can setup advance smart view cache rules in settings/override/viewcache.ini.append.php so your content expires the cache on the frontpage.

Alternatively you can set the cache_ttl value in your frontpage.tpl so cache expires every 10 minutes for instance, search for cache_ttl for how to do it.

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