Forums / Setup & design / Problem with cache

Problem with cache

Author Message

Aurélie Beaumont

Thursday 02 April 2009 7:00:21 am

Hi,

on the home page of my web site I want to put an event (the latest). For this, I use fetch function in my template. Here is an extract of my code that shows the event:

<a href={$event.url_alias|ezurl()}>
{if gt($event.data_map.title.content|count_chars(),60)}
{$event.data_map.title.content|shorten(60)}
{else}
{$event.data_map.title.content}
{/if}
</a>
<br />
{$event.data_map.from_time.content.timestamp|datetime( 'custom', '%l %j %F %Y' )}

The problem is : when I modifie the event or when I publish an event more recent, I MUST clean cache to view modifications on the home page.

Do you have a solution?

Thanks.

Łukasz Serwatka

Thursday 02 April 2009 7:49:56 am

Did you configure viewcache.ini rules correctly? Could you paste your settings?

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Aurélie Beaumont

Thursday 02 April 2009 8:31:36 am

My settings in viewcache.ini.append.php :

[ViewCacheSettings]
ClearRelationTypes[]=common
ClearRelationTypes[]=reverse_common
ClearRelationTypes[]=reverse_embedded
ClearRelationTypes[]=reverse_attribute
SmartCacheClear=enabled

[communique]
DependentClassIdentifier[]=master_communique
DependentClassIdentifier[]=master_financial_communique
ClearCacheMethod[]=object
ClearCacheMethod[]=parent
ClearCacheMethod[]=relating

[event]
DependentClassIdentifier[]=master_evenement
ClearCacheMethod[]=object
ClearCacheMethod[]=parent
ClearCacheMethod[]=relating

I want objets of type "communique" and "event" to be refresh automatically in home page.

"master_communique", "master_financier_communique" and "master evenement" are parent pages that contain my news.

eZ debug

Timing: Jan 30 2025 21:26:33
Script start
Timing: Jan 30 2025 21:26:33
Module start 'content'
Timing: Jan 30 2025 21:26:33
Module end 'content'
Timing: Jan 30 2025 21:26:33
Script end

Main resources:

Total runtime0.0276 sec
Peak memory usage6,144.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 587.9063370.3047
Module start 'content' 0.00660.0123 958.21091,001.4844
Module end 'content' 0.01890.0086 1,959.695370.7031
Script end 0.0275  2,030.3984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00227.9461120.0002
Check MTime0.00093.2684120.0001
Mysql Total
Database connection0.00062.068510.0006
Mysqli_queries0.003512.543440.0009
Looping result0.00000.050220.0000
Template Total0.008229.610.0082
Template load0.00072.554710.0007
Template processing0.007527.036710.0075
Override
Cache load0.00051.785610.0005
General
dbfile0.004415.8057100.0004
String conversion0.00000.022530.0000
Note: percentages do not add up to 100% because some accumulators overlap

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