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

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

How INI caches are stored?

eZ Publish stores in INI cache (or rather the compiled INI in PHP arrayes) in the non-modifiable var/cache/ini/ directory, as follows:

 {inifilename}-{hash}.php

For example for the different versions of design.ini:

  • design-677247a49e428aa0837411b52777b920.php
  • design-704216b4d0e3ea68c09742504bb366c8.php
  • design-7333039e7e19aa411f8dd01836555861.php

The hash is calculated using the following elements:

 

Table of hash key elements

Element of the hash key Meaning Example of value
FileName The name of the .ini file site.ini
module.ini
...
append.php is automatically added
RootDir The root of the INI path settings
settings/siteaccess/fre
settings/override
share/locale
DirectAccess Is it a request for direct access to a file without override stacking ? 1
NULL
(True / False)
overrideDirs Serialized array of the overrides of the involved INI in the different extensions, siteaccess a:34:{s:26:"ext-siteaccess:myextension";a:2:{i:0;s:45:"extension/myextension/settings/siteaccess/fre";i:1;b:1;}...
internalCharset The internal charset utf-8
 

How to expire all the INI cache?

The total expiry of the INI cache is done as follows:

php bin/php/ezcache.php --clear-id=global_ini

Deletes the var/cache/ini directory

php bin/php/ezcache.php --clear-tag=ini

Deleted the var/cache/ini directory as well as the activated extensions cache in /var/cache/active_extensions_{hash}.php

php bin/php/ezcache.php --clear-id=ini

Does nothing, or tries at least to recursively remove a nonexistent directory, namely {varDir}/ini. The var/cache/ini/ directory is located in lib/ezutils/classes/ezini.php...

 

 How to expire a set of INI caches?

It is not technically possible to expire a set of INI caches with the basic commands of eZ Publish. However, a targeted expiry of the INI cache (site.ini for example) can be done by simply deleting the involved files:

find var/cache/ini -name "site-*" | xargs rm
 
36 542 Users on board!

Tutorial menu

Printable

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

Author(s)

Proudly Developed with from