Forums / Setup & design / Template caching problems

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
*/ ?>

eZ debug

Timing: Jan 18 2025 16:07:17
Script start
Timing: Jan 18 2025 16:07:17
Module start 'content'
Timing: Jan 18 2025 16:07:17
Module end 'content'
Timing: Jan 18 2025 16:07:17
Script end

Main resources:

Total runtime0.1439 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0083 587.7109180.8359
Module start 'content' 0.00830.0055 768.5469101.9922
Module end 'content' 0.01380.1301 870.5391531.0234
Script end 0.1439  1,401.5625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00382.6133200.0002
Check MTime0.00161.1173200.0001
Mysql Total
Database connection0.00090.617710.0009
Mysqli_queries0.100369.67121410.0007
Looping result0.00130.90581390.0000
Template Total0.129790.110.1297
Template load0.00090.591410.0009
Template processing0.128989.537810.1289
Override
Cache load0.00060.417610.0006
Sytem overhead
Fetch class attribute can translate value0.00100.694110.0010
XML
Image XML parsing0.00030.211210.0003
General
dbfile0.00161.1104200.0001
String conversion0.00000.007030.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0003 secs