Caching again

Author Message

Christian Johansen

Tuesday 14 February 2006 1:07:52 am

I'm having a problem with "over cached items". I have some objects with a date field (stop publishing field). Then I have a listing that displays all the items where the date field has not already been (ie, object.date < current_date).

Problem is - when the site is cachet these items may be displayed on the listing for a day or even two past it's "stop publishing" date. How can I avoid this? Is it possible to use cronjobs to clear the cache every morning or something to that effect?

Christian Johansen

Thursday 16 February 2006 1:54:17 am

Can anyone offer some help? I'm really stuck...

laurent le cadet

Thursday 16 February 2006 7:07:07 am

You can optimise your cache in the template.
Add this line as first line.

{set-block scope=root variable=cache_ttl}86400{/set-block}

86400 secondes (24 hours)

Normaly the cache will be clear every 24 hours for that template.

Laurent

Christian Johansen

Friday 17 February 2006 12:23:19 am

Thanks! I'll try that.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 04:15:13
Script start
Timing: Jan 31 2025 04:15:13
Module start 'layout'
Timing: Jan 31 2025 04:15:13
Module start 'content'
Timing: Jan 31 2025 04:15:13
Module end 'content'
Timing: Jan 31 2025 04:15:13
Script end

Main resources:

Total runtime0.0192 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 588.0078151.1953
Module start 'layout' 0.00580.0035 739.203136.6172
Module start 'content' 0.00930.0080 775.820390.1094
Module end 'content' 0.01730.0018 865.929733.9922
Script end 0.0191  899.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002814.6030140.0002
Check MTime0.00136.7605140.0001
Mysql Total
Database connection0.00073.851110.0007
Mysqli_queries0.003517.987030.0012
Looping result0.00000.125510.0000
Template Total0.00147.110.0014
Template load0.00115.627510.0011
Template processing0.00031.464710.0003
Override
Cache load0.00084.074710.0008
General
dbfile0.003116.152280.0004
String conversion0.00000.055940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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