Forums / Setup & design / Cache Question

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

eZ debug

Timing: Jan 31 2025 01:14:43
Script start
Timing: Jan 31 2025 01:14:43
Module start 'content'
Timing: Jan 31 2025 01:14:43
Module end 'content'
Timing: Jan 31 2025 01:14:43
Script end

Main resources:

Total runtime0.2662 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0078 587.8203370.3125
Module start 'content' 0.00780.0306 958.13281,006.0938
Module end 'content' 0.03840.2277 1,964.22663,895.3906
Script end 0.2661  5,859.6172 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00501.8694200.0002
Check MTime0.00160.5909200.0001
Mysql Total
Database connection0.00080.297610.0008
Mysqli_queries0.132949.91661410.0009
Looping result0.00160.58451390.0000
Template Total0.227285.410.2272
Template load0.00100.391110.0010
Template processing0.226184.960510.2261
Override
Cache load0.00070.259210.0007
Sytem overhead
Fetch class attribute can translate value0.00240.918610.0024
XML
Image XML parsing0.00030.128810.0003
General
dbfile0.01866.9906200.0009
String conversion0.00000.002230.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.0001 secs