Cache Question

Author Message

Russell Michell

Tuesday 05 January 2010 2:41:59 pm

Hi,

I'm having trouble ensuring eZ does not cache anything during development.

I can make template changes that take effect immediately, but some things (ini changes and role->section assignment, possibly others) don't even take effect after I Clear "All caches" from the admin UI - I have to run the CLI ezcache.php script before the changes take effect:

 php bin/php/ezcache.php --clear-all --purge -s my-design

I've disabled just about every cache .ini setting I can find, are there others? Here's what I have in my settings/siteaccess/<my-design>/site.ini.append.php:

[FileSettings]
VarDir=var/my-design
CacheDir=cache
LogDir=logs
StorageDir=storage
StorageFilePermission=0660
StorageDirPermissions=0770

[TemplateSettings]
Debug=enabled
DevelopmentMode=enabled
ShowXHTMLCode=disabled
ShowUsedTemplates=disabled

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

[ContentSettings]
ViewCaching=disabled
CacheTreshold=0
 
[TemplateSettings]
TemplateCache=disabled
TemplateCompile=disabled
NodeTreeCaching=disabled
DevelopmentMode=enabled
ShowMethodDebug=enabled

I would simply like to be able to make changes in the admin backend, to templates and ini files and have the changes appear immediately. I have spent way too much time trying to figure out which collection of settings makes the cache "go away" for development.

I'm using eZ 4.1.3 and using two sepeare custom design-extensions with separte templates, CSS and each uses its own cache dir in var/<design>/cache.

Thanks a lot,
Russ

Russell Michell, Wellington, New Zealand.
We're building! http://www.theruss.com/blog/
I'm on Twitter: http://twitter.com/therussdotcom

Believe nothing, consider everything.

Jérôme Vieilledent

Wednesday 06 January 2010 4:29:57 am

Hi Russel

About INI caches, from 4.1 you have a special setting in config.php :

define( 'EZP_INI_FILEMTIME_CHECK', false );

If you set this constant to false (highly recommended), you will have performace improvements but you'll have to clear INI cache each time to make a modification in some INI file. Besides, clear-all-caches doesn't seem to clear INI cache (maybe an issue), so you have to clear-ini manually ;).

About policies, I don't really know... What do you want to do exactly ?

Regards

André R.

Wednesday 06 January 2010 7:01:22 am

As this is for development setup, do not enable the setting from Jérôme unless your found of clearing cache :)
Additionally there are settings for disabling role cache witch you should search for in site.ini, and if you use ezjscore it has a setting for disabling cache as well (but it will disable caching automatically if it is not set and DevelopmentMode is enabled).

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

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 18:40:44
Script start
Timing: Jan 18 2025 18:40:44
Module start 'layout'
Timing: Jan 18 2025 18:40:44
Module start 'content'
Timing: Jan 18 2025 18:40:45
Module end 'content'
Timing: Jan 18 2025 18:40:45
Script end

Main resources:

Total runtime0.8863 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0080 587.7891152.6094
Module start 'layout' 0.00800.0068 740.398439.4297
Module start 'content' 0.01470.8703 779.8281603.3906
Module end 'content' 0.88510.0012 1,383.218812.1953
Script end 0.8863  1,395.4141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00450.5068160.0003
Check MTime0.00180.1986160.0001
Mysql Total
Database connection0.00130.144110.0013
Mysqli_queries0.818992.3915590.0139
Looping result0.00080.0887570.0000
Template Total0.829493.620.4147
Template load0.00240.273420.0012
Template processing0.826993.298620.4135
Template load and register function0.00010.011410.0001
states
state_id_array0.00230.256110.0023
state_identifier_array0.00100.112820.0005
Override
Cache load0.00210.2327320.0001
Sytem overhead
Fetch class attribute can translate value0.00090.100730.0003
Fetch class attribute name0.00150.166760.0002
XML
Image XML parsing0.00200.228130.0007
class_abstraction
Instantiating content class attribute0.00000.001060.0000
General
dbfile0.00150.1640300.0000
String conversion0.00000.001540.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 9

Time used to render debug report: 0.0001 secs