Forums / Setup & design / Static cache update

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

eZ debug

Timing: Jan 18 2025 11:23:31
Script start
Timing: Jan 18 2025 11:23:31
Module start 'content'
Timing: Jan 18 2025 11:23:32
Module end 'content'
Timing: Jan 18 2025 11:23:32
Script end

Main resources:

Total runtime0.9712 sec
Peak memory usage4,096.0000 KB
Database Queries218

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 587.6875180.8438
Module start 'content' 0.00700.8369 768.5313725.6016
Module end 'content' 0.84400.1271 1,494.1328340.4609
Script end 0.9711  1,834.5938 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.4092210.0002
Check MTime0.00150.1538210.0001
Mysql Total
Database connection0.00090.094310.0009
Mysqli_queries0.878490.44672180.0040
Looping result0.00220.22212160.0000
Template Total0.939096.720.4695
Template load0.00200.207520.0010
Template processing0.936996.474220.4685
Template load and register function0.00010.014410.0001
states
state_id_array0.00150.155510.0015
state_identifier_array0.00180.189220.0009
Override
Cache load0.00180.1809370.0000
Sytem overhead
Fetch class attribute can translate value0.00100.106060.0002
Fetch class attribute name0.00110.1100120.0001
XML
Image XML parsing0.00190.196360.0003
class_abstraction
Instantiating content class attribute0.00000.0018120.0000
General
dbfile0.00860.8822380.0002
String conversion0.00000.000730.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 29
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs