Share » Forums » Install & configuration » Static cache - publishing doesn't...

Static cache - publishing doesn't update static cache

Static cache - publishing doesn't update static cache

Friday 13 May 2005 4:08:25 am - 3 replies

Author Message

Hans Melis

Friday 13 May 2005 5:17:49 am

Hi David

Which siteaccess do you use to publish the objects?

I suspect you're creating them in the admin interface. In the admin interface, static caching is disabled by default so any objects published in that siteacces listen to the siteaccess' settings.

I encountered the same thing, but I haven't tested a solution yet. I think just enabling static caching in the admin interface solves it, because the staticcache.ini contains a list of siteaccesses for which to generate the content.

Hans
http://blog.hansmelis.be

David Goddard

Friday 13 May 2005 9:29:35 am

Hi Hans

Going point! Yes, I am publishing the objects using the admin siteaccess but updating the user siteaccess settings. Doh!

I tried updating the admin siteaccess static caching settings, but it seems that you <b>must</b> also enable static caching at the override level too.

So these are the files and the changes (In this case it's just a test site which caches: / /news* and /events* always updating /news and /events)

settings/override/site.ini.append.php
[ContentSettings]
StaticCache=enabled

settings/siteaccess/plain_user/staticcache.ini.append.php
[CacheSettings]
HostName=ez3-6.djg-1.css.qmul.ac.uk
StaticStorageDir=var/static/plain_user
MaxCacheDepth=4

CachedURLArray[]
CachedURLArray[]=/
CachedURLArray[]=/news*
CachedURLArray[]=/events*

AlwaysUpdateArray[]
AlwaysUpdateArray[]=/
AlwaysUpdateArray[]=/events
AlwaysUpdateArray[]=/news

settings/siteaccess/plain_admin/staticcache.ini.append.php
[CacheSettings]
HostName=ez3-6.djg-1.css.qmul.ac.uk
StaticStorageDir=var/static/plain_user
MaxCacheDepth=4

CachedURLArray[]
CachedURLArray[]=/
CachedURLArray[]=/news*
CachedURLArray[]=/events*

AlwaysUpdateArray[]
AlwaysUpdateArray[]=/
AlwaysUpdateArray[]=/events
AlwaysUpdateArray[]=/news

I guess you could get rid of the settings/siteaccess/plain_user/staticcache.ini.append.php providing you were happy issuing the slightly counter-intuative

php bin/php/makestaticcache.php -s plain_admin -f

which actual updates the user siteaccess using the static caching settings from the admin siteaccess.

Oddly, when I publish an object is updates all the correct static files (by looking at time stamps), but doesn't use the updated data for the object in question. i.e. the unedited verion of the object is published. Only by re-editing (not making any changes) and re-publishing is the object correctly cached. It is almost as if the static caching is being executed <b>before</b> the database has been updated! A bug? Has anyone else got it to work?

I think perhaps I've got the wrong end of the stick with all this and that that this odd side effect is as a result of my misconfiguration.

Anyone elses advice on setting up static caching correctly when updating via the admin siteaccess greatly appreciated.

Cheers

David

Derick Rethans

Monday 23 May 2005 5:41:48 am

There was a bug with generating an cache file with outdated data when transactions where introduced some time ago. I just committed a fix to SVN for this.

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu