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