static cache: what am i doing wrong?

Author Message

Matthew Carroll

Friday 21 July 2006 9:16:39 am

I've had the static cache working fine on a couple of sites for a while now with hosts-based siteaccess selection. But I've tried to set it up on a different server (using url-based siteaccess selection which might be relevant) and I just can't get it to obey my ini settings. When I manually build the cache, the correct pages are cached, but when content is published from the public site, for some reason pages that are NOT included in the CachedURLArray are being cached. This is very problematic, since some of these pages are restricted access, and the login page is getting cached by mistake, preventing access to the content.

Here is the staticcache.ini.append.php from the siteaccess:

[CacheSettings]
StaticStorageDir=var/gv/static

HostName=www.globalvillage2006.org
MaxCacheDepth=5

CachedURLArray[]
CachedURLArray[]=/
CachedURLArray[]=/about_the_project
CachedURLArray[]=/find_out_about
CachedURLArray[]=/do_something_about
CachedURLArray[]=/about_the_project/*
CachedURLArray[]=/find_out_about/*
CachedURLArray[]=/do_something_about/*

AlwaysUpdateArray[]
AlwaysUpdateArray[]=/

CachedSiteAccesses[]
CachedSiteAccesses[]=en

There is no global override/staticcache.ini.append.php. Static cache is enabled in the siteaccess site.ini.append.php:

[ContentSettings]
ViewCaching=enabled
StaticCache=enabled

Like I said, pages outside that array are being cached. ALSO, pages that are edited are being cached again without being correctly cleared first. The result is pages are not updated properly unless manually cleared, and the time stamps on the bottom look like this:

...
</body>
</html>
<!-- Generated: 2006-07-21 14:06:20 -->

<!-- Generated: 2006-07-21 16:02:11 -->

<!-- Generated: 2006-07-21 16:27:33 -->

Any ideas? Maybe I missed something obvious. I'm rather stuck and short of time since I'm expecting this site to start getting lots more traffic next week. Thanks :-)

http://carroll.org.uk

Peter Putzer

Tuesday 01 August 2006 2:15:47 pm

Have a look at my patch at http://ez.no/community/bugs/static_cache_and_old_urls. I'm not sure about the CachedURLArray thing (which is probably not fixed by my patch), but it should always clear cache files before recreating the cache.

Greetings,
Peter

Accessible website starting from eZ publish 3.0 (currently: 4.1.0): http://pluspunkt.at

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 18 2025 15:55:09
Script start
Timing: Jan 18 2025 15:55:09
Module start 'layout'
Timing: Jan 18 2025 15:55:09
Module start 'content'
Timing: Jan 18 2025 15:55:10
Module end 'content'
Timing: Jan 18 2025 15:55:10
Script end

Main resources:

Total runtime1.4594 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 589.4453152.6250
Module start 'layout' 0.00610.0033 742.070339.4453
Module start 'content' 0.00941.4485 781.5156533.7891
Module end 'content' 1.45780.0015 1,315.304712.1563
Script end 1.4593  1,327.4609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.2180160.0002
Check MTime0.00130.0910160.0001
Mysql Total
Database connection0.00110.074910.0011
Mysqli_queries1.409296.5634540.0261
Looping result0.00060.0420520.0000
Template Total1.424097.620.7120
Template load0.00200.133820.0010
Template processing1.422097.443320.7110
Template load and register function0.00020.016310.0002
states
state_id_array0.00090.064510.0009
state_identifier_array0.00350.239920.0018
Override
Cache load0.00160.1089170.0001
Sytem overhead
Fetch class attribute can translate value0.00070.050820.0004
Fetch class attribute name0.00130.089840.0003
XML
Image XML parsing0.00250.174720.0013
class_abstraction
Instantiating content class attribute0.00000.000540.0000
General
dbfile0.00340.2304220.0002
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs