ibexa

Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

ClearRelationTypes

Summary

Controls whether the view caches for objects related in various ways should be cleared or not.

Usage

 

ClearRelationTypes[]=type1
ClearRelationTypes[]=type2
...

Description

This directive sets which related and reverse related objects the view caches should be cleared for as a response to the view cache being cleared for a specific object. More precisely, it can be used to control whether the view caches for objects that are related in various ways should be cleared or not. This setting is an array of strings where only four pre-defined values can be used (refer to the following table).

Type

Description

object

Clear cache for related objects that have relations at the object level.

reverse_object

Clear cache for reverse related objects that have relations at the object level.

attribute

Clear cache for related objects that have relations at the attribute level.

reverse_attribute

Clear cache for reverse related objects that have relations at the attribute level.

Note that if you need to set up additional/custom rules that control which nodes the view cache should be cleared for when the view cache for a specific object is being cleared, you'll have to use smart viewcache cleaning.

The "ClearRelationTypes" setting is only available in eZ Publish 3.8.7 and later versions.

Examples

Example 1

 

[ViewCacheSettings]
ClearRelationTypes[]
SmartCacheClear=disabled


When clearing the view cache for an object, the system will automatically clear the view cache for the following nodes:

  • All published nodes of this object and their parent nodes
  • Nodes of the objects that have the same keyword (if any)

Since the "ClearRelationTypes" configuration array is empty, the view caches for related and reverse related objects will not be cleared.

Example 2

 

[ViewCacheSettings]
ClearRelationTypes[]
ClearRelationTypes[]=object
ClearRelationTypes[]=reverse_object
SmartCacheClear=disabled


When clearing the view cache for an object, the system will automatically clear the view cache for the following nodes:

  • All published nodes of this object and their parent nodes
  • Nodes of the objects that have the same keyword (if any)
  • Nodes of related and reverse related objects that have relations at the object level

Note that the first two items on the list are not controlled by the "ClearRelationTypes" setting.

Svitlana Shatokhina (28/03/2007 9:44 am)

Svitlana Shatokhina (07/05/2007 11:13 am)

Svitlana Shatokhina, Balazs Halasy


Comments

There are no comments.