SlideShare une entreprise Scribd logo
1  sur  35
Télécharger pour lire hors ligne
222 Rond point Ernest Garnier
                                                 Immeuble Arche Jacques Cœur
                                                           34000 Montpellier
                                                                04 99 13 68 60




    23/10/2012

    eZ UnConference. Oct 2012


    EZ PUBLISH TOP-PERFORMANCE
    THROUGH MASTERY (AND EXTENSION)
    OF THE CACHE LAYERS
    Gilles Guirand              Gilles Ballini
    CTO Kaliop                  lead engineer Kaliop
    eZ Publish board member
    @gandbox

1                                                              KALIOP.COM
AGENDA


AGENDA
    Context

    CACHE-BLOCK concepts & Issues

    HOWTO build the perfect pagelayout :

      0 SQL query (home) / 1 SQL query (others)
      never more than 100 template-block files !
      save millions of SQL queries
      save I/O & Gigabytes of storage
      … save the eZ Publish reputation




                                                        2
222 Rond point Ernest Garnier
                                Immeuble Arche Jacques Cœur
                                          34000 Montpellier
                                               04 99 13 68 60




    23/10/2012

    eZ UnConference. Oct 2012


    CONTEXT




3                                             KALIOP.COM
CONTEXT

Sometimes…

  EZ Publish   produce 30 Gbytes of template-block files

  EZ Publish   never stop to increase the number of cache files

  EZ Publish   produce millions of SQL queries per day

  EZ Publish   crash on cache expiry events (subtree expiry)

  EZ Publish   crash the hosting (beginning of the war!)

 …




                                                                4
CONTEXT


& Sometimes... the end customer ask

  Is it an
          eZ Publish kernel issue OR a lack of knowledge from
   the developers team ?

  Is it sodifficult to manage the eZ Publish cache system ?
 All crashes seems to be related to that

  Because  the GAP between eZ4 & eZ5, is it not the time to
   evaluate new CMS competitors ?




                                                               5
CONTEXT


& most of times... a very huge
 optimization is possible in a quick time,
 to avoid all theses issues & crashes

 especially with the viewcache & the
 cache-block settings




                                         6
222 Rond point Ernest Garnier
                                Immeuble Arche Jacques Cœur
                                          34000 Montpellier
                                               04 99 13 68 60




    23/10/2012

    eZ UnConference. Oct 2012


    CACHE-BLOCK CONCEPTS
    & ISSUES




7                                             KALIOP.COM
CACHE-BLOCK


What for ?

               Template-block       cache = cache
                files related to cache-block, also
                called « template cache » (
                common mistake with the template
                compilation )

               Template-block     cache is an
                HTML (or other) cache of a
                template part ( cache-block


               ← Illustration : Łukasz Serwatkahttp://share.ez.no/learn/ez-
               publish/ez-publish-performance-optimization-part-3-of-3-practical-
               cache-and-template-solutions/(page)/2




                                                                                    8
CACHE-BLOCK


  Main parameters

KEY value                 Expiry rules

(none)                    (none) → 2 hours
                          expiry=3600
Custom value, array
                          (none) → on content update
module_result.uri         ignore_content_expiry
+
Others ( users, extra )   subtree_expiry=123
                          subtree_expiry=/news



                                                   9
CACHE-BLOCK

 Most of time, a pagelayout looks like
     that (ezdemo exemple) :
{cache-block keys=array( $module_result.uri, $basket_is_empty, $current_user.contentobject_id ,
$extra_cache_key )}
<!-- HEAD / HEADER -->


{cache-block keys=array( $module_result.uri, $user_hash, $extra_cache_key )}
<!-- TOP MENU -->


{/cache-block}
{/cache-block}


{$module_result.content}


{cache-block keys=array( $module_result.uri, $user_hash, $access_type.name, $extra_cache_key )}
<!-- FOOTER -->


{/cache-block}




                                                                                                           10
CACHE-BLOCK

Impact of common parameters

The « URI key » parameter : stupid but
  signifiant simulation
{cache-block keys=array( $module_result.uri, $user_hash, $extra_cache_key )}
<!-- TOP MENU -->
{/cache-block}


      A classic Web site, with 1000 nodes, news folder ( year, month archives ),
       products catalog ( filters ), calendar, forum, 2 siteaccess...

      Could generate 10 000 « indexable » several URI ( google bot )

      A cache-block ( only 1 URI key ) to cache the global menu, who is generating
       300 SQL queries

      No « expiry » or « ignore_content_expiry » parameters : so the cache-block
       expires every 2 hours (or on content publication)

                                                                                    11
CACHE-BLOCK


Impact of common parameters

The « URI key » parameter : stupid but signifiant
  simulation

   So...300 SQL queries * 12 expiration per day *
    10 000 URI = 36 millions of SQL queries per
    day...

   So... 30 000 template-block files
    ( 3 cache-block )



                                                     12
CACHE-BLOCK

Easy to say... but how to avoid ?

The « keys » parameter :

Please AVOID :
{cache-block keys=$uri_string}    1 template-block file
...                                for each URI !!!
{/cache-block}

Use instead :
{cache-block ignore_content_expiry expiry=86400
    keys=$my_custom_limited_range_key}
...
                                  Only possible states of your
{/cache-block}
                                    content inside your block


                                                             13
CACHE-BLOCK

What is the main motivation for using
 an URI Key ?

  easy for caching values which could be different for each
   URI ( title, metas, ezjscore script & css includes,
   breadcrumbs, main menu, right column... )

  found exemple on ezwebin, ezdemo (      is it not the best
   code exemples ? )

  working fine   on my workstation, so move on

  not mypriority, because not visible, i have
   IE6/7/8/9/10 CSS issues to resolve first


                                                            14
CACHE-BLOCK


How eZ stores the template-block cache




                                       15
CACHE-BLOCK


How eZ stores the template-block cache




                                       16
222 Rond point Ernest Garnier
                                 Immeuble Arche Jacques Cœur
                                           34000 Montpellier
                                                04 99 13 68 60




     23/10/2012

     eZ UnConference. Oct 2012


     HOW TO BUILD THE
     PERFECT PAGELAYOUT




17                                             KALIOP.COM
PERFECT PAGELAYOUT


Which values I have to expose ?




                                        18
PERFECT PAGELAYOUT


Which values I have to evaluate ?




                                          19
PERFECT PAGELAYOUT


Is there an out of the box tool for that ?




                                             20
PERFECT PAGELAYOUT


How ezpagedata works ?




                                          21
PERFECT PAGELAYOUT

FULL view exemple : node/view/full.tpl

{* Title *}
{ezpagedata_set( 'title', $node.name|concat( ' - ',
   ezini( 'SiteSettings', 'SiteName', 'site.ini' ) ) )}


pagelayout.tpl

{* Title *}
{if is_set( ezpagedata().persistent_variable.title )}
    <title>{ezpagedata().persistent_variable.title|wash}</title>
{else}
    <title>{ezini( 'SiteSettings', 'SiteName', 'site.ini' )}</title>
{/if}

                                                                       22
PERFECT PAGELAYOUT

FULL view exemple : node/view/full.tpl

{* metadata *}
{ezpagedata_append( 'metadata',
               hash( 'description', $my_page_description,
                       ‘keywords', $my_keywords ) )}


pagelayout.tpl

{* metadata *}
{foreach ezpagedata().persistent_variable.metadata as $name =>
$content}
   <meta name="{$name|wash}" content="{$content|wash}" />
{/foreach}



                                                            23
PERFECT PAGELAYOUT

FULL view exemple : node/view/full.tpl

{* Breadcrumbs *}
{set-block variable=breadcrumbs}
      {foreach $node.path as $subpath}
...
      {/foreach}
...
{/set-block}
{ezpagedata_set( 'breadcrumbs', $breadcrumbs )}

Pagelayout.tpl
{if is_set( ezpagedata().persistent_variable.breadcrumbs )}
   <p>{ezpagedata().persistent_variable.breadcrumbs}</p>
{/if}

                                                          24
PERFECT PAGELAYOUT


FULL view exemple : node/view/full.tpl

{* Javascript / CSS inclusion *}


{ezscript_require( array( 'myscript1.js', 'myscript2.js' ) )}


{ezcss_require( array( 'style.css' ) )}


No more ezpagedata() ?
No, ezjscore share the same persistent variables array,
and use variables names : 'css_files', 'js_files'




                                                                 25
PERFECT PAGELAYOUT


FULL view exemple : node/view/full.tpl

{* Javascript / CSS inclusion *}
{ezcss_require( array( 'style.css', 'style2.css' ) )}



pagelayout.tpl
{def $css_cache_keys = persistent_cache_keys( ezpagedata(), 'css_files' )}
   {cache-block keys=$css_cache_keys ignore_content_expiry
expiry=86400}
   {ezcss_load( array( ezini( 'StylesheetSettings', ' FrontendCSSFileList','design.ini' ) ) )}
   {/cache-block}
{undef $css_cache_keys}



                                                                                            26
PERFECT PAGELAYOUT

FULL view exemple : node/view/full.tpl

public static function persistent_cache_keys( $namedParameters )
{
    $pageData = $namedParameters['pagedata'];
    $cacheType = $namedParameters['type'];
    $keys = $pageData['persistent_variable'][$cacheType];
    if ( empty( $keys ) )
    {
          $keys = array( 'nokey' );
    }
    $operatorValue = array_unique( $keys );
    sort( $operatorValue );
    return $operatorValue;
}

                                                                   27
PERFECT PAGELAYOUT


Is possible to evaluate the key without a
 template operator ?

  YES :
 keys=first_set( ezpagedata().persistent_variable.js_files,
                   array('0') )|unique()|asort()


  But when a    template code is not enough readable, i
   still prefer to read PHP




                                                              28
PERFECT PAGELAYOUT


Am i done ?

 NO, use the same logical for the main menu :

  FULL     : Set your « current section » CSS value, et set
     a persistent_variable

     Pagelayout : get back your persistent_variable &
     use it like a cache-block key Use the same logical for
     the right colunm, the footer or whatever which is
     more easy to evaluate inside the full view


                                                          29
PERFECT PAGELAYOUT


Am i done ?

  Use the same logical for the right colunm, the
   footer or whatever which is more easy to
   evaluate inside the full view




                                                30
222 Rond point Ernest Garnier
                                 Immeuble Arche Jacques Cœur
                                           34000 Montpellier
                                                04 99 13 68 60




     23/10/2012

     eZ UnConference. Oct 2012


     CONCLUSION




31                                             KALIOP.COM
CONCLUSION


Conclusion


 Need cache-blocks only for css & js
  embedding, main menu, right
  column, footer... and never need an
  URI key




                                        32
CONCLUSION

Conclusion

 0 SQL query    (home) / 1 SQL query (others)

    never more than 100 template-block files !

    save millions of SQL queries ( on expiry )

    save I/O & Gigabytes of storage

 …   save the eZ Publish reputation


                                                  33
eZ UnConference - Z Publish top-performance through mastery (and extension) of the cache layers
eZ UnConference - Z Publish top-performance through mastery (and extension) of the cache layers

Contenu connexe

Tendances

Learnings from Real eZ Publish 5 Projects
Learnings from Real eZ Publish 5 ProjectsLearnings from Real eZ Publish 5 Projects
Learnings from Real eZ Publish 5 ProjectsDonat Fritschy
 
The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6Wim Godden
 
Mysqlnd, an unknown powerful PHP extension
Mysqlnd, an unknown powerful PHP extensionMysqlnd, an unknown powerful PHP extension
Mysqlnd, an unknown powerful PHP extensionjulien pauli
 
Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariJoseph Scott
 
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Wim Godden
 
How to deploy node to production
How to deploy node to productionHow to deploy node to production
How to deploy node to productionSean Hess
 
PHP 5.6 New and Deprecated Features
PHP 5.6  New and Deprecated FeaturesPHP 5.6  New and Deprecated Features
PHP 5.6 New and Deprecated FeaturesMark Niebergall
 
How we Started with eZ publish 5 a Real Use Case
How we Started with eZ publish 5 a Real Use CaseHow we Started with eZ publish 5 a Real Use Case
How we Started with eZ publish 5 a Real Use Casecoolscreen.de
 
Camel and JBoss
Camel and JBossCamel and JBoss
Camel and JBossJBug Italy
 
Php extensions workshop
Php extensions workshopPhp extensions workshop
Php extensions workshopjulien pauli
 
php & performance
 php & performance php & performance
php & performancesimon8410
 
PHP & Performance
PHP & PerformancePHP & Performance
PHP & Performance毅 吕
 
eZ Publish Platform 5.4 public webinar
eZ Publish Platform 5.4 public webinareZ Publish Platform 5.4 public webinar
eZ Publish Platform 5.4 public webinarRoland Benedetti
 
Virtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + PuppetVirtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + PuppetOmar Reygaert
 
Faster & Greater Messaging System HornetQ zzz
Faster & Greater Messaging System HornetQ zzzFaster & Greater Messaging System HornetQ zzz
Faster & Greater Messaging System HornetQ zzzJBug Italy
 
OpenCSW - What is the project about?
OpenCSW - What is the project about?OpenCSW - What is the project about?
OpenCSW - What is the project about?dmichelsen
 

Tendances (20)

Learnings from Real eZ Publish 5 Projects
Learnings from Real eZ Publish 5 ProjectsLearnings from Real eZ Publish 5 Projects
Learnings from Real eZ Publish 5 Projects
 
The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6
 
Mysqlnd, an unknown powerful PHP extension
Mysqlnd, an unknown powerful PHP extensionMysqlnd, an unknown powerful PHP extension
Mysqlnd, an unknown powerful PHP extension
 
Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to Ferrari
 
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011
 
How to deploy node to production
How to deploy node to productionHow to deploy node to production
How to deploy node to production
 
PHP 5.6 New and Deprecated Features
PHP 5.6  New and Deprecated FeaturesPHP 5.6  New and Deprecated Features
PHP 5.6 New and Deprecated Features
 
How we Started with eZ publish 5 a Real Use Case
How we Started with eZ publish 5 a Real Use CaseHow we Started with eZ publish 5 a Real Use Case
How we Started with eZ publish 5 a Real Use Case
 
Camel and JBoss
Camel and JBossCamel and JBoss
Camel and JBoss
 
Centos config
Centos configCentos config
Centos config
 
Php extensions workshop
Php extensions workshopPhp extensions workshop
Php extensions workshop
 
php & performance
 php & performance php & performance
php & performance
 
PHP 7 new engine
PHP 7 new enginePHP 7 new engine
PHP 7 new engine
 
Sahu
SahuSahu
Sahu
 
PHP & Performance
PHP & PerformancePHP & Performance
PHP & Performance
 
eZ Publish Platform 5.4 public webinar
eZ Publish Platform 5.4 public webinareZ Publish Platform 5.4 public webinar
eZ Publish Platform 5.4 public webinar
 
Virtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + PuppetVirtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + Puppet
 
Sah
SahSah
Sah
 
Faster & Greater Messaging System HornetQ zzz
Faster & Greater Messaging System HornetQ zzzFaster & Greater Messaging System HornetQ zzz
Faster & Greater Messaging System HornetQ zzz
 
OpenCSW - What is the project about?
OpenCSW - What is the project about?OpenCSW - What is the project about?
OpenCSW - What is the project about?
 

Similaire à eZ UnConference - Z Publish top-performance through mastery (and extension) of the cache layers

He stopped using for/while loops, you won't believe what happened next!
He stopped using for/while loops, you won't believe what happened next!He stopped using for/while loops, you won't believe what happened next!
He stopped using for/while loops, you won't believe what happened next!François-Guillaume Ribreau
 
XMLDB Building Blocks And Best Practices - Oracle Open World 2008 - Marco Gra...
XMLDB Building Blocks And Best Practices - Oracle Open World 2008 - Marco Gra...XMLDB Building Blocks And Best Practices - Oracle Open World 2008 - Marco Gra...
XMLDB Building Blocks And Best Practices - Oracle Open World 2008 - Marco Gra...Marco Gralike
 
OCCIware, a formal framework for Everything as a Service. OW2con'15, November...
OCCIware, a formal framework for Everything as a Service. OW2con'15, November...OCCIware, a formal framework for Everything as a Service. OW2con'15, November...
OCCIware, a formal framework for Everything as a Service. OW2con'15, November...OW2
 
OCCIware, a formal framework for Everything as a Service. OW2con'15, November...
OCCIware, a formal framework for Everything as a Service. OW2con'15, November...OCCIware, a formal framework for Everything as a Service. OW2con'15, November...
OCCIware, a formal framework for Everything as a Service. OW2con'15, November...OCCIware
 
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...tutorialsruby
 
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...tutorialsruby
 
Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"
Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"
Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"LogeekNightUkraine
 
[CCC-28c3] Post Memory Corruption Memory Analysis
[CCC-28c3] Post Memory Corruption Memory Analysis[CCC-28c3] Post Memory Corruption Memory Analysis
[CCC-28c3] Post Memory Corruption Memory AnalysisMoabi.com
 
OCCIware & Linked Data prototype OW2Con@POSS
OCCIware & Linked Data prototype OW2Con@POSSOCCIware & Linked Data prototype OW2Con@POSS
OCCIware & Linked Data prototype OW2Con@POSSMarc Dutoo
 
Varnish, ESI & Cookies @Service-Public
Varnish, ESI & Cookies @Service-PublicVarnish, ESI & Cookies @Service-Public
Varnish, ESI & Cookies @Service-PublicBenjamin BRABANT
 
Sql server scalability fundamentals
Sql server scalability fundamentalsSql server scalability fundamentals
Sql server scalability fundamentalsChris Adkin
 
How to deploy & optimize eZ Publish
How to deploy & optimize eZ PublishHow to deploy & optimize eZ Publish
How to deploy & optimize eZ PublishKaliop-slide
 
Scale11x lxc talk
Scale11x lxc talkScale11x lxc talk
Scale11x lxc talkdotCloud
 
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytes
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytesWindows Kernel Exploitation : This Time Font hunt you down in 4 bytes
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytesPeter Hlavaty
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalabilityWim Godden
 
LXC Containers and AUFs
LXC Containers and AUFsLXC Containers and AUFs
LXC Containers and AUFsDocker, Inc.
 
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...Maarten Balliauw
 
Closing the Storage gap - presentation from OpenStack Summit in Vancouver 2015
Closing the Storage gap - presentation from OpenStack Summit in Vancouver 2015Closing the Storage gap - presentation from OpenStack Summit in Vancouver 2015
Closing the Storage gap - presentation from OpenStack Summit in Vancouver 2015it-novum
 

Similaire à eZ UnConference - Z Publish top-performance through mastery (and extension) of the cache layers (20)

Mutexes 2
Mutexes 2Mutexes 2
Mutexes 2
 
He stopped using for/while loops, you won't believe what happened next!
He stopped using for/while loops, you won't believe what happened next!He stopped using for/while loops, you won't believe what happened next!
He stopped using for/while loops, you won't believe what happened next!
 
XMLDB Building Blocks And Best Practices - Oracle Open World 2008 - Marco Gra...
XMLDB Building Blocks And Best Practices - Oracle Open World 2008 - Marco Gra...XMLDB Building Blocks And Best Practices - Oracle Open World 2008 - Marco Gra...
XMLDB Building Blocks And Best Practices - Oracle Open World 2008 - Marco Gra...
 
OCCIware, a formal framework for Everything as a Service. OW2con'15, November...
OCCIware, a formal framework for Everything as a Service. OW2con'15, November...OCCIware, a formal framework for Everything as a Service. OW2con'15, November...
OCCIware, a formal framework for Everything as a Service. OW2con'15, November...
 
OCCIware, a formal framework for Everything as a Service. OW2con'15, November...
OCCIware, a formal framework for Everything as a Service. OW2con'15, November...OCCIware, a formal framework for Everything as a Service. OW2con'15, November...
OCCIware, a formal framework for Everything as a Service. OW2con'15, November...
 
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
 
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
exploit-writing-tutorial-part-5-how-debugger-modules-plugins-can-speed-up-bas...
 
Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"
Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"
Yevhen Tatarynov "My .NET Application Allocates too Much Memory. What Can I Do?"
 
[CCC-28c3] Post Memory Corruption Memory Analysis
[CCC-28c3] Post Memory Corruption Memory Analysis[CCC-28c3] Post Memory Corruption Memory Analysis
[CCC-28c3] Post Memory Corruption Memory Analysis
 
OCCIware & Linked Data prototype OW2Con@POSS
OCCIware & Linked Data prototype OW2Con@POSSOCCIware & Linked Data prototype OW2Con@POSS
OCCIware & Linked Data prototype OW2Con@POSS
 
Varnish, ESI & Cookies @Service-Public
Varnish, ESI & Cookies @Service-PublicVarnish, ESI & Cookies @Service-Public
Varnish, ESI & Cookies @Service-Public
 
Sql server scalability fundamentals
Sql server scalability fundamentalsSql server scalability fundamentals
Sql server scalability fundamentals
 
How to deploy & optimize eZ Publish
How to deploy & optimize eZ PublishHow to deploy & optimize eZ Publish
How to deploy & optimize eZ Publish
 
Scale11x lxc talk
Scale11x lxc talkScale11x lxc talk
Scale11x lxc talk
 
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytes
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytesWindows Kernel Exploitation : This Time Font hunt you down in 4 bytes
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytes
 
Caching and tuning fun for high scalability
Caching and tuning fun for high scalabilityCaching and tuning fun for high scalability
Caching and tuning fun for high scalability
 
LXC Containers and AUFs
LXC Containers and AUFsLXC Containers and AUFs
LXC Containers and AUFs
 
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
 
Performance #1 memory
Performance #1   memoryPerformance #1   memory
Performance #1 memory
 
Closing the Storage gap - presentation from OpenStack Summit in Vancouver 2015
Closing the Storage gap - presentation from OpenStack Summit in Vancouver 2015Closing the Storage gap - presentation from OpenStack Summit in Vancouver 2015
Closing the Storage gap - presentation from OpenStack Summit in Vancouver 2015
 

Plus de Kaliop-slide

E z conference 2016 : The Next Generation of Innovative Applications: Powere...
E z conference 2016  : The Next Generation of Innovative Applications: Powere...E z conference 2016  : The Next Generation of Innovative Applications: Powere...
E z conference 2016 : The Next Generation of Innovative Applications: Powere...Kaliop-slide
 
L'agilité au service de l'innovation
L'agilité au service de l'innovationL'agilité au service de l'innovation
L'agilité au service de l'innovationKaliop-slide
 
[webinar du 26/02/2015] Magento / Prestashop : bien choisir sa solution e-com...
[webinar du 26/02/2015] Magento / Prestashop : bien choisir sa solution e-com...[webinar du 26/02/2015] Magento / Prestashop : bien choisir sa solution e-com...
[webinar du 26/02/2015] Magento / Prestashop : bien choisir sa solution e-com...Kaliop-slide
 
[Webinar du 6/11/2014] Réussir son projet E-commerce en mode agile
[Webinar du 6/11/2014] Réussir son projet E-commerce en mode agile[Webinar du 6/11/2014] Réussir son projet E-commerce en mode agile
[Webinar du 6/11/2014] Réussir son projet E-commerce en mode agileKaliop-slide
 
[Webinar du 17/06/2014] Bien intégrer sa boutique e-Commerce à son système d'...
[Webinar du 17/06/2014] Bien intégrer sa boutique e-Commerce à son système d'...[Webinar du 17/06/2014] Bien intégrer sa boutique e-Commerce à son système d'...
[Webinar du 17/06/2014] Bien intégrer sa boutique e-Commerce à son système d'...Kaliop-slide
 
L’amélioration continue de votre environnement de travail et de votre entrepr...
L’amélioration continue de votre environnement de travail et de votre entrepr...L’amélioration continue de votre environnement de travail et de votre entrepr...
L’amélioration continue de votre environnement de travail et de votre entrepr...Kaliop-slide
 
Ezobject wrapper workshop
Ezobject wrapper workshopEzobject wrapper workshop
Ezobject wrapper workshopKaliop-slide
 
Comment créer, optimiser et monétiser vos contenus ?
Comment créer, optimiser et monétiser vos contenus ?Comment créer, optimiser et monétiser vos contenus ?
Comment créer, optimiser et monétiser vos contenus ?Kaliop-slide
 
Web performance optimization
Web performance optimizationWeb performance optimization
Web performance optimizationKaliop-slide
 
Utilisation d’eZ Flow sur le site www.kaliop.fr
Utilisation d’eZ Flow sur le site www.kaliop.frUtilisation d’eZ Flow sur le site www.kaliop.fr
Utilisation d’eZ Flow sur le site www.kaliop.frKaliop-slide
 
Webinar e-tourisme : Créer une expérience utilisateur riche grâce à eZ Publish
Webinar e-tourisme : Créer une expérience utilisateur riche grâce à eZ PublishWebinar e-tourisme : Créer une expérience utilisateur riche grâce à eZ Publish
Webinar e-tourisme : Créer une expérience utilisateur riche grâce à eZ PublishKaliop-slide
 
Bien choisir sa solution e-commerce
Bien choisir sa solution e-commerceBien choisir sa solution e-commerce
Bien choisir sa solution e-commerceKaliop-slide
 
Webinar : ezpublish pour vos projets e-tourisme
Webinar : ezpublish pour vos projets e-tourismeWebinar : ezpublish pour vos projets e-tourisme
Webinar : ezpublish pour vos projets e-tourismeKaliop-slide
 
Optimisez vos flux commerciaux avec la marketing automation
Optimisez vos flux commerciaux avec la marketing automationOptimisez vos flux commerciaux avec la marketing automation
Optimisez vos flux commerciaux avec la marketing automationKaliop-slide
 
Tour de Contrôle (Kaliop E-Commerce Dataflow System)
Tour de Contrôle (Kaliop E-Commerce Dataflow System)Tour de Contrôle (Kaliop E-Commerce Dataflow System)
Tour de Contrôle (Kaliop E-Commerce Dataflow System)Kaliop-slide
 
LE RESPONSIVE WEBDESIGN : VOTRE VISIBILITÉ WEB OPTIMALE SUR TOUS LES SUPPORTS...
LE RESPONSIVE WEBDESIGN : VOTRE VISIBILITÉ WEB OPTIMALE SUR TOUS LES SUPPORTS...LE RESPONSIVE WEBDESIGN : VOTRE VISIBILITÉ WEB OPTIMALE SUR TOUS LES SUPPORTS...
LE RESPONSIVE WEBDESIGN : VOTRE VISIBILITÉ WEB OPTIMALE SUR TOUS LES SUPPORTS...Kaliop-slide
 
Redeploiement d’une plateforme eZpublish multisites internationale
Redeploiement d’une plateforme eZpublish multisites internationaleRedeploiement d’une plateforme eZpublish multisites internationale
Redeploiement d’une plateforme eZpublish multisites internationaleKaliop-slide
 
CHALLENGE Ez On tour, outil de publication web pour le e-tourisme
CHALLENGE Ez On tour, outil de publication web pour le e-tourismeCHALLENGE Ez On tour, outil de publication web pour le e-tourisme
CHALLENGE Ez On tour, outil de publication web pour le e-tourismeKaliop-slide
 
L'approche affinitaire : un levier marketing efficace pour les acteurs du e-t...
L'approche affinitaire : un levier marketing efficace pour les acteurs du e-t...L'approche affinitaire : un levier marketing efficace pour les acteurs du e-t...
L'approche affinitaire : un levier marketing efficace pour les acteurs du e-t...Kaliop-slide
 

Plus de Kaliop-slide (20)

E z conference 2016 : The Next Generation of Innovative Applications: Powere...
E z conference 2016  : The Next Generation of Innovative Applications: Powere...E z conference 2016  : The Next Generation of Innovative Applications: Powere...
E z conference 2016 : The Next Generation of Innovative Applications: Powere...
 
L'agilité au service de l'innovation
L'agilité au service de l'innovationL'agilité au service de l'innovation
L'agilité au service de l'innovation
 
[webinar du 26/02/2015] Magento / Prestashop : bien choisir sa solution e-com...
[webinar du 26/02/2015] Magento / Prestashop : bien choisir sa solution e-com...[webinar du 26/02/2015] Magento / Prestashop : bien choisir sa solution e-com...
[webinar du 26/02/2015] Magento / Prestashop : bien choisir sa solution e-com...
 
[Webinar du 6/11/2014] Réussir son projet E-commerce en mode agile
[Webinar du 6/11/2014] Réussir son projet E-commerce en mode agile[Webinar du 6/11/2014] Réussir son projet E-commerce en mode agile
[Webinar du 6/11/2014] Réussir son projet E-commerce en mode agile
 
[Webinar du 17/06/2014] Bien intégrer sa boutique e-Commerce à son système d'...
[Webinar du 17/06/2014] Bien intégrer sa boutique e-Commerce à son système d'...[Webinar du 17/06/2014] Bien intégrer sa boutique e-Commerce à son système d'...
[Webinar du 17/06/2014] Bien intégrer sa boutique e-Commerce à son système d'...
 
L’amélioration continue de votre environnement de travail et de votre entrepr...
L’amélioration continue de votre environnement de travail et de votre entrepr...L’amélioration continue de votre environnement de travail et de votre entrepr...
L’amélioration continue de votre environnement de travail et de votre entrepr...
 
Ezobject wrapper workshop
Ezobject wrapper workshopEzobject wrapper workshop
Ezobject wrapper workshop
 
Comment créer, optimiser et monétiser vos contenus ?
Comment créer, optimiser et monétiser vos contenus ?Comment créer, optimiser et monétiser vos contenus ?
Comment créer, optimiser et monétiser vos contenus ?
 
Web performance optimization
Web performance optimizationWeb performance optimization
Web performance optimization
 
Utilisation d’eZ Flow sur le site www.kaliop.fr
Utilisation d’eZ Flow sur le site www.kaliop.frUtilisation d’eZ Flow sur le site www.kaliop.fr
Utilisation d’eZ Flow sur le site www.kaliop.fr
 
Webinar e-tourisme : Créer une expérience utilisateur riche grâce à eZ Publish
Webinar e-tourisme : Créer une expérience utilisateur riche grâce à eZ PublishWebinar e-tourisme : Créer une expérience utilisateur riche grâce à eZ Publish
Webinar e-tourisme : Créer une expérience utilisateur riche grâce à eZ Publish
 
Bien choisir sa solution e-commerce
Bien choisir sa solution e-commerceBien choisir sa solution e-commerce
Bien choisir sa solution e-commerce
 
Webinar : ezpublish pour vos projets e-tourisme
Webinar : ezpublish pour vos projets e-tourismeWebinar : ezpublish pour vos projets e-tourisme
Webinar : ezpublish pour vos projets e-tourisme
 
Optimisez vos flux commerciaux avec la marketing automation
Optimisez vos flux commerciaux avec la marketing automationOptimisez vos flux commerciaux avec la marketing automation
Optimisez vos flux commerciaux avec la marketing automation
 
Tour de Contrôle (Kaliop E-Commerce Dataflow System)
Tour de Contrôle (Kaliop E-Commerce Dataflow System)Tour de Contrôle (Kaliop E-Commerce Dataflow System)
Tour de Contrôle (Kaliop E-Commerce Dataflow System)
 
LE RESPONSIVE WEBDESIGN : VOTRE VISIBILITÉ WEB OPTIMALE SUR TOUS LES SUPPORTS...
LE RESPONSIVE WEBDESIGN : VOTRE VISIBILITÉ WEB OPTIMALE SUR TOUS LES SUPPORTS...LE RESPONSIVE WEBDESIGN : VOTRE VISIBILITÉ WEB OPTIMALE SUR TOUS LES SUPPORTS...
LE RESPONSIVE WEBDESIGN : VOTRE VISIBILITÉ WEB OPTIMALE SUR TOUS LES SUPPORTS...
 
Redeploiement d’une plateforme eZpublish multisites internationale
Redeploiement d’une plateforme eZpublish multisites internationaleRedeploiement d’une plateforme eZpublish multisites internationale
Redeploiement d’une plateforme eZpublish multisites internationale
 
CJW Newsletter
CJW NewsletterCJW Newsletter
CJW Newsletter
 
CHALLENGE Ez On tour, outil de publication web pour le e-tourisme
CHALLENGE Ez On tour, outil de publication web pour le e-tourismeCHALLENGE Ez On tour, outil de publication web pour le e-tourisme
CHALLENGE Ez On tour, outil de publication web pour le e-tourisme
 
L'approche affinitaire : un levier marketing efficace pour les acteurs du e-t...
L'approche affinitaire : un levier marketing efficace pour les acteurs du e-t...L'approche affinitaire : un levier marketing efficace pour les acteurs du e-t...
L'approche affinitaire : un levier marketing efficace pour les acteurs du e-t...
 

Dernier

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 

Dernier (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

eZ UnConference - Z Publish top-performance through mastery (and extension) of the cache layers

  • 1. 222 Rond point Ernest Garnier Immeuble Arche Jacques Cœur 34000 Montpellier 04 99 13 68 60 23/10/2012 eZ UnConference. Oct 2012 EZ PUBLISH TOP-PERFORMANCE THROUGH MASTERY (AND EXTENSION) OF THE CACHE LAYERS Gilles Guirand Gilles Ballini CTO Kaliop lead engineer Kaliop eZ Publish board member @gandbox 1 KALIOP.COM
  • 2. AGENDA AGENDA  Context  CACHE-BLOCK concepts & Issues  HOWTO build the perfect pagelayout :  0 SQL query (home) / 1 SQL query (others)  never more than 100 template-block files !  save millions of SQL queries  save I/O & Gigabytes of storage  … save the eZ Publish reputation 2
  • 3. 222 Rond point Ernest Garnier Immeuble Arche Jacques Cœur 34000 Montpellier 04 99 13 68 60 23/10/2012 eZ UnConference. Oct 2012 CONTEXT 3 KALIOP.COM
  • 4. CONTEXT Sometimes…  EZ Publish produce 30 Gbytes of template-block files  EZ Publish never stop to increase the number of cache files  EZ Publish produce millions of SQL queries per day  EZ Publish crash on cache expiry events (subtree expiry)  EZ Publish crash the hosting (beginning of the war!) … 4
  • 5. CONTEXT & Sometimes... the end customer ask  Is it an eZ Publish kernel issue OR a lack of knowledge from the developers team ?  Is it sodifficult to manage the eZ Publish cache system ? All crashes seems to be related to that  Because the GAP between eZ4 & eZ5, is it not the time to evaluate new CMS competitors ? 5
  • 6. CONTEXT & most of times... a very huge optimization is possible in a quick time, to avoid all theses issues & crashes  especially with the viewcache & the cache-block settings 6
  • 7. 222 Rond point Ernest Garnier Immeuble Arche Jacques Cœur 34000 Montpellier 04 99 13 68 60 23/10/2012 eZ UnConference. Oct 2012 CACHE-BLOCK CONCEPTS & ISSUES 7 KALIOP.COM
  • 8. CACHE-BLOCK What for ?  Template-block cache = cache files related to cache-block, also called « template cache » ( common mistake with the template compilation )  Template-block cache is an HTML (or other) cache of a template part ( cache-block ← Illustration : Łukasz Serwatkahttp://share.ez.no/learn/ez- publish/ez-publish-performance-optimization-part-3-of-3-practical- cache-and-template-solutions/(page)/2 8
  • 9. CACHE-BLOCK  Main parameters KEY value Expiry rules (none) (none) → 2 hours expiry=3600 Custom value, array (none) → on content update module_result.uri ignore_content_expiry + Others ( users, extra ) subtree_expiry=123 subtree_expiry=/news 9
  • 10. CACHE-BLOCK  Most of time, a pagelayout looks like that (ezdemo exemple) : {cache-block keys=array( $module_result.uri, $basket_is_empty, $current_user.contentobject_id , $extra_cache_key )} <!-- HEAD / HEADER --> {cache-block keys=array( $module_result.uri, $user_hash, $extra_cache_key )} <!-- TOP MENU --> {/cache-block} {/cache-block} {$module_result.content} {cache-block keys=array( $module_result.uri, $user_hash, $access_type.name, $extra_cache_key )} <!-- FOOTER --> {/cache-block} 10
  • 11. CACHE-BLOCK Impact of common parameters The « URI key » parameter : stupid but signifiant simulation {cache-block keys=array( $module_result.uri, $user_hash, $extra_cache_key )} <!-- TOP MENU --> {/cache-block}  A classic Web site, with 1000 nodes, news folder ( year, month archives ), products catalog ( filters ), calendar, forum, 2 siteaccess...  Could generate 10 000 « indexable » several URI ( google bot )  A cache-block ( only 1 URI key ) to cache the global menu, who is generating 300 SQL queries  No « expiry » or « ignore_content_expiry » parameters : so the cache-block expires every 2 hours (or on content publication) 11
  • 12. CACHE-BLOCK Impact of common parameters The « URI key » parameter : stupid but signifiant simulation  So...300 SQL queries * 12 expiration per day * 10 000 URI = 36 millions of SQL queries per day...  So... 30 000 template-block files ( 3 cache-block ) 12
  • 13. CACHE-BLOCK Easy to say... but how to avoid ? The « keys » parameter : Please AVOID : {cache-block keys=$uri_string}  1 template-block file ... for each URI !!! {/cache-block} Use instead : {cache-block ignore_content_expiry expiry=86400 keys=$my_custom_limited_range_key} ...  Only possible states of your {/cache-block} content inside your block 13
  • 14. CACHE-BLOCK What is the main motivation for using an URI Key ?  easy for caching values which could be different for each URI ( title, metas, ezjscore script & css includes, breadcrumbs, main menu, right column... )  found exemple on ezwebin, ezdemo ( is it not the best code exemples ? )  working fine on my workstation, so move on  not mypriority, because not visible, i have IE6/7/8/9/10 CSS issues to resolve first 14
  • 15. CACHE-BLOCK How eZ stores the template-block cache 15
  • 16. CACHE-BLOCK How eZ stores the template-block cache 16
  • 17. 222 Rond point Ernest Garnier Immeuble Arche Jacques Cœur 34000 Montpellier 04 99 13 68 60 23/10/2012 eZ UnConference. Oct 2012 HOW TO BUILD THE PERFECT PAGELAYOUT 17 KALIOP.COM
  • 18. PERFECT PAGELAYOUT Which values I have to expose ? 18
  • 19. PERFECT PAGELAYOUT Which values I have to evaluate ? 19
  • 20. PERFECT PAGELAYOUT Is there an out of the box tool for that ? 20
  • 22. PERFECT PAGELAYOUT FULL view exemple : node/view/full.tpl {* Title *} {ezpagedata_set( 'title', $node.name|concat( ' - ', ezini( 'SiteSettings', 'SiteName', 'site.ini' ) ) )} pagelayout.tpl {* Title *} {if is_set( ezpagedata().persistent_variable.title )} <title>{ezpagedata().persistent_variable.title|wash}</title> {else} <title>{ezini( 'SiteSettings', 'SiteName', 'site.ini' )}</title> {/if} 22
  • 23. PERFECT PAGELAYOUT FULL view exemple : node/view/full.tpl {* metadata *} {ezpagedata_append( 'metadata', hash( 'description', $my_page_description, ‘keywords', $my_keywords ) )} pagelayout.tpl {* metadata *} {foreach ezpagedata().persistent_variable.metadata as $name => $content} <meta name="{$name|wash}" content="{$content|wash}" /> {/foreach} 23
  • 24. PERFECT PAGELAYOUT FULL view exemple : node/view/full.tpl {* Breadcrumbs *} {set-block variable=breadcrumbs} {foreach $node.path as $subpath} ... {/foreach} ... {/set-block} {ezpagedata_set( 'breadcrumbs', $breadcrumbs )} Pagelayout.tpl {if is_set( ezpagedata().persistent_variable.breadcrumbs )} <p>{ezpagedata().persistent_variable.breadcrumbs}</p> {/if} 24
  • 25. PERFECT PAGELAYOUT FULL view exemple : node/view/full.tpl {* Javascript / CSS inclusion *} {ezscript_require( array( 'myscript1.js', 'myscript2.js' ) )} {ezcss_require( array( 'style.css' ) )} No more ezpagedata() ? No, ezjscore share the same persistent variables array, and use variables names : 'css_files', 'js_files' 25
  • 26. PERFECT PAGELAYOUT FULL view exemple : node/view/full.tpl {* Javascript / CSS inclusion *} {ezcss_require( array( 'style.css', 'style2.css' ) )} pagelayout.tpl {def $css_cache_keys = persistent_cache_keys( ezpagedata(), 'css_files' )} {cache-block keys=$css_cache_keys ignore_content_expiry expiry=86400} {ezcss_load( array( ezini( 'StylesheetSettings', ' FrontendCSSFileList','design.ini' ) ) )} {/cache-block} {undef $css_cache_keys} 26
  • 27. PERFECT PAGELAYOUT FULL view exemple : node/view/full.tpl public static function persistent_cache_keys( $namedParameters ) { $pageData = $namedParameters['pagedata']; $cacheType = $namedParameters['type']; $keys = $pageData['persistent_variable'][$cacheType]; if ( empty( $keys ) ) { $keys = array( 'nokey' ); } $operatorValue = array_unique( $keys ); sort( $operatorValue ); return $operatorValue; } 27
  • 28. PERFECT PAGELAYOUT Is possible to evaluate the key without a template operator ?  YES : keys=first_set( ezpagedata().persistent_variable.js_files, array('0') )|unique()|asort()  But when a template code is not enough readable, i still prefer to read PHP 28
  • 29. PERFECT PAGELAYOUT Am i done ? NO, use the same logical for the main menu :  FULL : Set your « current section » CSS value, et set a persistent_variable  Pagelayout : get back your persistent_variable & use it like a cache-block key Use the same logical for the right colunm, the footer or whatever which is more easy to evaluate inside the full view 29
  • 30. PERFECT PAGELAYOUT Am i done ?  Use the same logical for the right colunm, the footer or whatever which is more easy to evaluate inside the full view 30
  • 31. 222 Rond point Ernest Garnier Immeuble Arche Jacques Cœur 34000 Montpellier 04 99 13 68 60 23/10/2012 eZ UnConference. Oct 2012 CONCLUSION 31 KALIOP.COM
  • 32. CONCLUSION Conclusion Need cache-blocks only for css & js embedding, main menu, right column, footer... and never need an URI key 32
  • 33. CONCLUSION Conclusion 0 SQL query (home) / 1 SQL query (others)  never more than 100 template-block files !  save millions of SQL queries ( on expiry )  save I/O & Gigabytes of storage … save the eZ Publish reputation 33