Template caching problems

Author Message

Marek W

Monday 03 January 2005 8:37:36 am

I have problems with template caching system (eZ 3.5), after publishing/editing/removing node cache is not refreshed (for example, in admin siteaccess new node is only visible in "Sub items" but not in left menu). My site.ini settings:

[ContentSettings]
ViewCaching=enabled
PreViewCache=disabled
PreCacheSiteaccessArray[]=plain
PreCacheSiteaccessArray[]=admin

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

I'm also using mmcache, here are settings:

mmcache.cache_dir /var/mmcache
mmcache.check_mtime 1
mmcache.compress 1
mmcache.content shm_and_disk
mmcache.debug 0
mmcache.enable 1
mmcache.filter ""
mmcache.keys shm_and_disk
mmcache.optimizer 1
mmcache.sessions shm_and_disk
mmcache.shm_max 0
mmcache.shm_only 0
mmcache.shm_prune_period 1800
mmcache.shm_size 50
mmcache.shm_ttl 900

If I disable template caching, everything is OK

[ContentSettings]
ViewCaching=disabled
PreViewCache=disabled
PreCacheSiteaccessArray[]=plain
PreCacheSiteaccessArray[]=admin

[TemplateSettings]
TemplateCache=disabled
TemplateCompile=disabled
TemplateCompression=disabled
Debug=disabled

What settings should I check?

Thanks for help!

Joel Hardi

Monday 03 January 2005 10:01:03 am

You may have the Smart Viewcache Cleaning System 'svcs' enabled (it is enabled by default in 3.4). When it is enabled, eZ Publish tries to figure out which nodes need to be refreshed when an object is published, and only clears those nodes.

Since this hasn't worked very well for me in practice, I usually disable it so that eZ Publish will clear all caches on publish.

To disable, create a viewcache.ini.append.php file in /settings/override and put this in it:

[ViewCacheSettings]
# Controls the smart viewcache handler, use enabled or disabled.
# When the handler is disabled the system will clear/expire all cache
# files when objects are published.
SmartCacheClear=disabled

More info here: http://ez.no/ez_publish/documentation/incoming/smart_viewcache_cleaning_system

Marek W

Monday 03 January 2005 10:09:12 am

SmartCache is already disabled, any other possibilities?

Joel Hardi

Monday 03 January 2005 10:28:41 am

Hmm, sorry, that was my best idea. You may want to check file permissions. Debug output doesn't tell you anything useful?

Marek W

Monday 03 January 2005 11:41:45 am

Nope, no clues in debug output, permissions are probably OK, because I can clean cache via admin interface...

Ɓukasz Serwatka

Monday 03 January 2005 11:44:38 am

Hi Marek,

Put this in your /settings/siteaccess/prefix/site.ini files

[ContentSettings]
ViewCaching=disabled

[TemplateSettings]
TemplateCache=enabled
TemplateCompile=enabled

Good practice is to disable ViewCache until you finish built your website.

UPDATE
Look at this
http://www.ez.no/ez_publish/documentation/faq/general/content_does_not_appear_in_admin_after_publish

I hope this help

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Jack Rackham

Monday 14 February 2005 6:38:14 am

If you are planning to turn the viewcache on again, I recommend you to look inside you settings/siteaccess/yoursite_admin folder to see if smartcache is enabled on your <b>"yoursite admin"</b>.
* Look for: viewcache.ini.append.php
* Disable SmartCacheClear

<?php /* #?ini charset="iso-8859-1"?

[ViewCacheSettings]
SmartCacheClear=disabled
*/ ?>

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