This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Learn » eZ Publish » eZ Publish Cache In Details: Template...

eZ Publish Cache In Details: Template Compilation And INI Cache

Tuesday 15 January 2013 1:02:43 pm

  • Currently 5 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

INI Cache

INI files caching does not have a big impact on server load since it does not use SQL and relatively little RAM / CPU. As we will see in this chapter, the INI cache essentialy limits the amount of I/O and uniformly accelerates construction time of pages.


What is the role of INI cache ?

eZ Publish supports multiple naming conventions in a INI configuration file:

  • mysetting.ini 
    • at the root of : settings
    • at the root of the extensions : extension/myextension/settings/mysetting.ini
    • at the root of share/locale
  • mysetting.ini.append (gradually depreciated, to avoid)
  • mysetting.ini.append.php to override an INI file in different dedicated locations 
    • settings/siteaccess/
    • settings/override/
    • extension/myextension/settings/
    • extension/myextension/settings/siteaccess/

The syntax used in the INI files is of the form:

<?php /*
# ...*/ ?> 

The caching transforms this familiar syntax in hierarchical PHP array keys, thus not requiring a systematicparsing of the INI files.


How are INI caches generated?

eZ Publish generates INI caches “on the fly” as follows:

  • Loading of an INI files is involked by a template (ezini) or the PHP API (static eZINI class)
  • The hash and the cache file path involved is calculated beforehand
  • If the file exists in cache, it loads the data
    • If EZP_INI_FILEMTIME_CHECK is commented (by default) in config.php, then there is a recursive check in all the involved overrides that the data has not changed and a save of a new cache if necessary
    • If EZP_INI_FILEMTIME_CHECK is uncommented (and remais FALSE) in config.php, there is a direct usage of the cache file data, without automatic check for possible updates
 define('EZP_INI_FILEMTIME_CHECK', false);

As specified in the config.php documentation, uncommenting the EZP_INI_FILEMTIME_CHECK improves performance because it allows eZ Publish to not systematicly verify the presence of possible updates in the INI override tree (I/O gain and between 10% to 15% recognized gain on loading time of eZ Publish pages, depending on I/O performance of the storage system).

36 542 Users on board!

Tutorial menu


Printer Friendly version of the full article on one page with plain styles


Proudly Developed with from