eZ Community » Learn » eZ Publish » eZ Publish Cache In Details:...

eZ Publish Cache In Details: Template-block Cache

Thursday 02 May 2013 8:56:14 am

  • Currently 3 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Performance optimization with cache-block overlapping

Now that we know how to set the frequency of expiry of the “cache-block”, it is important to consider the following question : "How to optimize the reconstruction of a cache-block that has expired ?". Of of the tools that we can use (in addition with optimizing templates) is “cache-blocks” overlapping.

Let’s take 1 template block that we want expire every hour

  • The first part of the template could ultimately never expire and still generate 50 SQL queries
  • The second part of the template should expire based on a change of content in a subtree

 

We obtain the following overlaps:

{cache-block expiry=3600}
...
   {cache-block ignore_content_expiry expiry=0}
      ... {* 50 queries saved every hour *}
   {/cache-block}
...
   {cache-block subtree_expiry='news/'}
      ...
   {/cache-block}
...
{/cache-block}

 

 

 
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