Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-24783

Template block cache is always expired on content operations "sort" and "updatepriority"

    XMLWordPrintable

    Details

      Description

      The template block cache is always expired on content operations "sort" and "updatepriority", and this can cause the server load, because the cache is cleared multiple times in the same process.

      updatepriority
      File: ezpublish_legacy/extension/ezjscore/classes/ezjscserverfunctionsnode.php
      Method ezjscServerFunctionsNode::updatePriority() calls eZContentCacheManager::clearContentCache().
      In the end eZContentObject::expireTemplateBlockCache() is called that expires the "template-block-cache" in the expiry.php.

      sort
      File: ezpublish_legacy/kernel/content/ezcontentoperationcollection.php
      Method eZContentOperationCollection::changeSortOrder() calls eZContentCacheManager::clearContentCache().
      In the end eZContentObject::expireTemplateBlockCache() is called that expires the "template-block-cache" in the expiry.php.

      possible solution
      Instead of eZContentCacheManager::clearContentCache() it would be better if eZContentCacheManager::clearContentCacheIfNeeded() is called in above methods.

      Also, the used methods are clearing cache although cache is disabled in the ini file.

      clearContentCacheIfNeeded has this check:

      if ( eZINI::instance()->variable( 'ContentSettings', 'ViewCaching' ) !== 'enabled' )
      

      And the ezpublish_legacy/extension/ezflow/classes/ezflowoperations.php file has the following line:

      eZContentCacheManager::clearContentCache( $contentObject->attribute('id') );
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            ricardo.correia-obsolete@ez.no Ricardo Correia (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: