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