eZPublish  3.8
eZContentCacheManager Class Reference

Figures out relations between objects, nodes and classes for cache management. More...

Public Member Functions

 appendSiblingsNodeIDs (&$nodeList, &$nodeIDList)
 
 dependencyInfo ($classID, $ignoreINISettings=false)
 
 eZContentCacheManager ()
 

Static Public Member Functions

 appendKeywordNodeIDs (&$object, $versionNum, &$nodeIDList)
 
 appendNodeIDs (&$nodeList, &$nodeIDList)
 
 appendParentNodeIDs (&$object, $versionNum, &$nodeIDList)
 
 appendRelatingNodeIDs (&$object, &$nodeIDList)
 
 clearAllContentCache ($ignoreINISettings=false)
 
 clearContentCache ($objectID, $versionNum=true, $additionalNodeList=false)
 
 clearContentCacheIfNeeded ($objectID, $versionNum=true, $additionalNodeList=false)
 
 clearContentCacheIfNeededBySectionID ($sectionID)
 
 clearObjectViewCache ($objectID, $versionNum=true, $additionalNodeList=false)
 
 clearObjectViewCacheIfNeeded ($objectID, $versionNum=true, $additionalNodeList=false)
 
 clearTemplateBlockCache ($objectID)
 
 clearTemplateBlockCacheIfNeeded ($objectID)
 
 clearViewCache ($objectID, $versionNum=true, $additionalNodeList=false)
 
fetchNodePathString (&$nodeList)
 
 generateObjectViewCache ($objectID)
 
nodeList ($objectID, $versionNum)
 
 nodeListForObject (&$contentObject, $versionNum, $clearCacheType, &$nodeList)
 

Detailed Description

Figures out relations between objects, nodes and classes for cache management.

This class works together with eZContentCache to manage the cache files for content viewing. This class takes care of finding out the relationship and then passes a list of nodes to eZContentCache which does the actual clearing.

The manager uses special rules in 'viewcache.ini' to figure relationships.

See Also
eZContentCache

Member Function Documentation

eZContentCacheManager::appendKeywordNodeIDs ( $object,
  $versionNum,
$nodeIDList 
)
static

Appends node ids of objects with the same keyword(s) as $object to $nodeIDList array.

Parameters
$versionNumThe version of the object to use or true for current version
[out]$nodeIDListArray with node IDs

Referenced by nodeListForObject().

eZContentCacheManager::appendNodeIDs ( $nodeList,
$nodeIDList 
)
static

Appends nodes ids from $nodeList list to $nodeIDList

Parameters
[out]$nodeIDListArray with node IDs

Referenced by nodeListForObject().

eZContentCacheManager::appendParentNodeIDs ( $object,
  $versionNum,
$nodeIDList 
)
static

Appends parent nodes ids of $object to $nodeIDList array.

Parameters
$versionNumThe version of the object to use or true for current version
[out]$nodeIDListArray with node IDs

Referenced by nodeListForObject().

eZContentCacheManager::appendRelatingNodeIDs ( $object,
$nodeIDList 
)
static

Find all content objects that relates $object and appends their node IDs to $nodeIDList.

Parameters
[out]$nodeIDListArray with node IDs

Referenced by nodeListForObject().

eZContentCacheManager::appendSiblingsNodeIDs ( $nodeList,
$nodeIDList 
)

Referenced by nodeListForObject().

eZContentCacheManager::clearAllContentCache (   $ignoreINISettings = false)
static

Clears all content cache: view cache, template-block cache, template-block with subtree_expiry parameter cache.

Referenced by eZContentLanguage\addLanguage(), eZContentLanguage\remove(), removeRelatedCache(), and eZContentClass\storeDefined().

eZContentCacheManager::clearContentCache (   $objectID,
  $versionNum = true,
  $additionalNodeList = false 
)
static

Clears content cache for specified object: view cache, template-block cache, template-block with subtree_expiry parameter cache without checking of ini settings.

eZContentCacheManager::clearContentCacheIfNeeded (   $objectID,
  $versionNum = true,
  $additionalNodeList = false 
)
static

Clears content cache for specified object: view cache, template-block cache, template-block with subtree_expiry parameter cache. Checks appropriate ini settings to determine whether caches are enabled or not.

Referenced by eZURLObjectLink\clearCacheForObjectLink(), clearContentCacheIfNeededBySectionID(), eZContentOperationCollection\clearObjectViewCache(), eZContentObjectTreeNodeOperations\move(), eZContentOperationCollection\publishNode(), eZContentObjectOperations\remove(), eZContentObjectTreeNode\remove(), eZContentObjectTreeNode\removeNodeFromTree(), and eZContentObjectTreeNode\removeSubtrees().

eZContentCacheManager::clearContentCacheIfNeededBySectionID (   $sectionID)
static

Clears content cache if needed by $sectionID

eZContentCacheManager::clearObjectViewCache (   $objectID,
  $versionNum = true,
  $additionalNodeList = false 
)
static

Clears view caches of nodes, parent nodes and relating nodes of content objects with id $objectID. It will use 'viewcache.ini' to determine additional nodes.

Parameters
$versionNumThe version of the object to use or true for current version
$additionalNodeListAn array with node IDs to add to clear list, or false for no additional nodes.

Referenced by clearContentCache(), clearObjectViewCacheIfNeeded(), clearViewCache(), eZContentObject\fixReverseRelations(), and eZContentObject\removeReverseRelations().

eZContentCacheManager::clearObjectViewCacheIfNeeded (   $objectID,
  $versionNum = true,
  $additionalNodeList = false 
)
static

Clears view cache for specified object. Checks 'ViewCaching' ini setting to determine whether cache is enabled or not.

Referenced by clearContentCacheIfNeeded().

eZContentCacheManager::clearTemplateBlockCache (   $objectID)
static

Clears template-block cache and template-block with subtree_expiry parameter caches for specified object without checking 'TemplateCache' ini setting. If $objectID is false all template block caches will be cleared.

Referenced by clearContentCache(), and clearTemplateBlockCacheIfNeeded().

eZContentCacheManager::clearTemplateBlockCacheIfNeeded (   $objectID)
static

Clears template-block cache and template-block with subtree_expiry parameter caches for specified object. Checks 'TemplateCache' ini setting to determine whether cache is enabled or not. If $objectID is false all template block caches will be cleared.

Referenced by clearContentCacheIfNeeded(), and eZPackageType\storeObjectAttribute().

eZContentCacheManager::clearViewCache (   $objectID,
  $versionNum = true,
  $additionalNodeList = false 
)
static

Depreciated. Use 'clearObjectViewCache' instead

eZContentCacheManager::dependencyInfo (   $classID,
  $ignoreINISettings = false 
)

Referenced by nodeListForObject().

eZContentCacheManager::eZContentCacheManager ( )
Note
Not used, all methods are static
& eZContentCacheManager::fetchNodePathString ( $nodeList)
static

Goes through all content nodes in $nodeList and extracts the 'path_string'.

Returns
An array with 'path_string' information.

Referenced by nodeListForObject().

eZContentCacheManager::generateObjectViewCache (   $objectID)
static

Generates the related viewcaches (PreGeneration) for the content object. It will only do this if [ContentSettings]/PreViewCache in site.ini is enabled.

Parameters
$objectIDThe ID of the content object to generate caches for.

Referenced by eZContentOperationCollection\generateObjectViewCache().

& eZContentCacheManager::nodeList (   $objectID,
  $versionNum 
)
static

Figures out all nodes that are affected by the change of object $objectID. This involves finding all nodes, parent nodes and nodes of objects that relate this object. The 'viewcache.ini' file is also checked to see if some special content classes has dependencies to the current object, if this is true extra nodes might be included.

Parameters
$versionNumThe version of the object to use or true for current version
$additionalNodeListAn array with node IDs to add to clear list, or false for no additional nodes.
Returns
An array with node IDs that must have their viewcaches cleared.

Referenced by clearObjectViewCache().

eZContentCacheManager::nodeListForObject ( $contentObject,
  $versionNum,
  $clearCacheType,
$nodeList 
)
static

Use $clearCacheType to include different kind of nodes( parent, relating, etc ). If $versionNum is true, then current version will be used.

Parameters
$contentObjectCurrent content object that is checked.
$versionNumThe version of the object to use or true for current version
$clearCacheTypeBit field which controls the the extra nodes to include, use bitwise or with one of these defines:
  • EZ_VCSC_CLEAR_NODE_CACHE - Clear the nodes of the object
  • EZ_VCSC_CLEAR_PARENT_CACHE - Clear the parent nodes of the object
  • EZ_VCSC_CLEAR_RELATING_CACHE - Clear nodes of objects that relate this object
  • EZ_VCSC_CLEAR_KEYWORD_CACHE - Clear nodes of objects that have the same keyword as this object
  • EZ_VCSC_CLEAR_SIBLINGS_CACHE - Clear caches for siblings of the node.
  • EZ_VCSC_CLEAR_ALL_CACHE - Enables all of the above
[out]$nodeListAn array with node IDs that are affected by the current object change.
Note
This function is recursive.

Referenced by generateObjectViewCache(), and nodeList().


The documentation for this class was generated from the following file: