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.

eZ debug

Timing: Jan 18 2025 19:25:15
Script start
Timing: Jan 18 2025 19:25:15
Module start 'layout'
Timing: Jan 18 2025 19:25:15
Module start 'content'
Timing: Jan 18 2025 19:25:16
Module end 'content'
Timing: Jan 18 2025 19:25:16
Script end

Main resources:

Total runtime0.8303 sec
Peak memory usage4,096.0000 KB
Database Queries73

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0079 589.0313152.6250
Module start 'layout' 0.00790.0033 741.656339.4453
Module start 'content' 0.01110.8177 781.1016663.7734
Module end 'content' 0.82890.0014 1,444.875016.7891
Script end 0.8302  1,461.6641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3884160.0002
Check MTime0.00130.1568160.0001
Mysql Total
Database connection0.00140.168010.0014
Mysqli_queries0.761091.6589730.0104
Looping result0.00080.1009710.0000
Template Total0.799596.320.3997
Template load0.00210.253720.0011
Template processing0.797496.036420.3987
Template load and register function0.00020.024410.0002
states
state_id_array0.00090.103710.0009
state_identifier_array0.00150.183720.0008
Override
Cache load0.00180.2137420.0000
Sytem overhead
Fetch class attribute can translate value0.00080.091440.0002
Fetch class attribute name0.00170.209290.0002
XML
Image XML parsing0.00200.241240.0005
class_abstraction
Instantiating content class attribute0.00000.002690.0000
General
dbfile0.00100.1146240.0000
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
14content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 33
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs