Static cache update

Author Message

Christian Johansen

Monday 03 April 2006 1:15:09 pm

Can someone help me out with how static caches are updated? My staticcache.ini.append:

#?ini charset="iso-8859-1"?
[CacheSettings]
HostName=myhost
StaticStorageDir=static
MaxCacheDepth=5

CachedURLArray[]
CachedURLArray[]=/
CachedURLArray[]=/news*
CachedURLArray[]=/products*

CachedSiteAccesses[]
CachedSiteAccesses[]=mysiteaccess

AlwaysUpdateArray[]
AlwaysUpdateArray[]=/news
AlwaysUpdateArray[]=/products

With these settings I expected that publishing a new product would provide me with a new products page. It did not. I tried clearing the cache and publishing a new one - still the old page.

What must I do in order to make this work transparently? I would rather not have to dish out a shell connection to the server and running rm -r static/* && php bin/php/makestaticcache.php -s myaccess everytime I publish something...

Bertrand Dunogier

Tuesday 04 April 2006 3:55:09 am

Static cache should be refreshed depending on the same parameters as View Caching. If it is not properl configured, Static cache will not be refreshed.

Check in override/content.ini.append.php that the AvailableSiteDesignList[] variable actually lists your designs (usually admin and your custom design).

View Caching renewal also depends on SmartCacheClear settings. For instance, parent of an object are cleared upon publishing, and objects who have relations to a published object are cleared as well.

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Christian Johansen

Tuesday 04 April 2006 5:26:37 am

Thank you for your input. I've tried to add my site design in content.ini.append.php as well as enabling SmartCacheClear. I then flushed my cache to renew the ini-settings, published a new object and went over to the site - no changes.

Anything more I need to do in order for this to work (obviously - but what)? Is this documented clearly somewhere? All I can find is bits and pieces lying around, mostly the forums.

Christian Johansen

Friday 07 April 2006 3:46:05 am

Any ideas on this? I'm still stuck and if the static cache is not updated it really doesn't offer me that much of a convenience...

Christian Johansen

Monday 24 April 2006 8:08:57 am

Has anyone ever succeeded in making this work? No matter what I do I cannot seem to have my static cache update itself upon publishing new content. I have a site on a webhost where static cache would be REALLY welcome, but as long as I don't know how to refresh it without ssh'ing to the server I can't really use it. Can anyone help?

Hans Melis

Monday 24 April 2006 9:17:23 am

Have you enabled static cache in the global site.ini override (settings/override/site.ini.append.php)? That one should contain <b>StaticCache=enabled</b> under <b>[ContentSettings]</b>.

This is needed because the publishing of new data happens on a different siteaccess than the static one. And the non-static siteaccess doesn't know if static cache is enabled.

It might, and probably will, also work if you put that in the override of the dynamic siteaccess, but try it first in the global override.

Hans
http://blog.hansmelis.be

Christian Johansen

Tuesday 25 April 2006 1:26:41 am

In my settings/override/site.ini.append.php:

...
[ContentSettings]
ViewCaching=enabled
PreViewCache=disabled
TranslationList=nor-NO;eng-GB
StaticCache=enabled

[TemplateSettings]
TemplateCompile=disabled
TemplateCache=enabled
TemplateCompression=disabled
TemplateOptimization=disabled

And as posted before, my settings/override/staticcache.ini.append.php:

<? /* #?ini charset="iso-8859-1"?
[CacheSettings]
HostName=www.myhost.com/index.php
StaticStorageDir=static
MaxCacheDepth=5

# A list of url's to cache. You can use the * wildcard to include a whole
# subtree.
CachedURLArray[]
CachedURLArray[]=/
CachedURLArray[]=/news*
CachedURLArray[]=/products*

# A list of site accesses to generate static content for
CachedSiteAccesses[]
CachedSiteAccesses[]=mysiteaccess

# A list of locations that will be updated whenever an object is published. You
# can NOT use a wildcard here.
AlwaysUpdateArray[]
AlwaysUpdateArray[]=/
AlwaysUpdateArray[]=/news
AlwaysUpdateArray[]=/products
*/ ?>

Yet, I have no updating. Is there anything else that's needed?

Stephen Schwenker

Thursday 12 October 2006 6:08:36 pm

Has anyone ifgured this one out? I've been struggling with this for a week now and can't get it to work.

Thank you,

Steve.

Kristof Coomans

Friday 13 October 2006 4:26:12 am

I'll continue in this topic: http://ez.no/community/forum/install_configuration/configuration_problems_with_staticcache

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

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