This part of the 4.x documentation is for eZ Publish 4.0, only reference section is common for all eZ Publish 4.x versions as well as eZ Publish 5.x "LegacyStack", please select the version you are using for the most up to date documentation! |
When a new version (also the first version) of an object is published, the system will automatically clear the view cache for the following items:
In addition, the view caches of the following nodes will also be cleared:
This is controlled by the "ClearRelationTypes" configuration setting.
This default behavior can be extended by configuring the smart viewcache cleaning system.
Note that clearing the view caches for a set of nodes within a certain siteaccess means that caches for the same nodes will also be cleared on all the related siteaccesses.
The administration interface allows you to clear the view cache for a node that is being viewed:
Clearing the view cache using popup menu.
You can also clear the view cache for the entire subtree (together with the node itself) by selecting the "Delete the view cache from here" item from the pop-up menu.
It is possible to clear the view cache for a specific node or subtree using the "ezcontentcache.php" script located in the "bin/php" directory of the eZ Publish installation. The following examples demonstrate how this can be done.
Let's say that node 46 is the company about page (http://www.mysite.com/company/about) and you have made some changes to a custom template that is used for this node. If view caching is enabled, your changes will not be seen until you clear the view cache for node 46:
./bin/php/ezcontentcache.php --clear-node=46
or./bin/php/ezcontentcache.php --clear-node=/company/about
This will clear the view cache for node 46 (and for other locations of the same object, if any), their parent nodes, nodes of objects containing the same keywords, nodes of related and reverse related objects that have relations of the "common" type and nodes of reverse related objects that have relations of the "XML embedded" type. If you need to clear view caches for several nodes, specify their ID numbers (or nice URLs) separated by commas:
./bin/php/ezcontentcache.php --clear-node=46,59,63
The script will clear all content caches related to each of the given nodes.
Let's say that node 72 is the company news folder (http://www.mysite.com/company/news) containing a lot of news articles. To clear the view caches for this folder and the nodes below it, do the following:
./bin/php/ezcontentcache.php --clear-subtree=72
or./bin/php/ezcontentcache.php --clear-subtree=/company/news
If you need to clear view caches for several subtrees, specify the nice URLs (or ID numbers) of their root nodes separated by commas:
./bin/php/ezcontentcache.php --clear-subtree=/company/news,/partners
The script will then clear view caches for the specified subtrees.
Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.