Forums / Setup & design / static cache: what am i doing wrong?

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

eZ debug

Timing: Jan 21 2025 02:39:05
Script start
Timing: Jan 21 2025 02:39:05
Module start 'content'
Timing: Jan 21 2025 02:39:05
Module end 'content'
Timing: Jan 21 2025 02:39:05
Script end

Main resources:

Total runtime0.2106 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0091 587.7344180.8281
Module start 'content' 0.00910.0068 768.562594.0078
Module end 'content' 0.01590.1946 862.5703523.8281
Script end 0.2105  1,386.3984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00432.0199200.0002
Check MTime0.00170.8084200.0001
Mysql Total
Database connection0.00150.699510.0015
Mysqli_queries0.154673.42321410.0011
Looping result0.00190.88951390.0000
Template Total0.194092.110.1940
Template load0.00110.541910.0011
Template processing0.192991.596210.1929
Override
Cache load0.00070.324810.0007
Sytem overhead
Fetch class attribute can translate value0.00080.374210.0008
XML
Image XML parsing0.00040.202310.0004
General
dbfile0.00221.0218200.0001
String conversion0.00000.003830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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.0002 secs