SlideShare a Scribd company logo
1 of 16
Download to read offline
SYMFONY PHP OSLO MEETUP
New in upcoming Symfony 3.1: CACHE COMPONET
“PSR-6 Cache, Symfony Cache component, and beyond”
André Rømcke - VP Engineering @ezsystems
Apr. 20th 2016 - Oslo - Norway Symfony Meetup
www.ez.noez.no
Me
๏André Rømcke @andrerom
๏VP Engineering at eZ Systems AS, eZ is:
Symfony Full stack user & active ecosystem member since 2012
Partner with Sensio Labs (and Blackfire)
Open Source CMS for more then 15 years with deep needs for intelligent caching
๏PHP-FIG voting member
Currently user of Stash Cache, project that originally initiated PSR-6
Been at times participating in discussions around PSR-6 and Symfony Cache
www.ez.noez.no
PSR-6?
๏First proposed in Dec 14, 2011, final version approved Dec 8, 2015
๏Been true several iterations, polls among PHP users/library-providers, ..
๏Will be expanded in the future with additional features as implementations evolves
๏Some known implementations:
๏Stash
๏PHP-Cache
๏Symfony
๏..and many others
๏http://www.php-fig.org/psr/psr-6/
www.ez.noez.no
PSR-6: Example
namespace PsrCacheCacheItemPoolInterface;


function getWidgetList(CacheItemPoolInterface $pool)

{

$item = $pool->getItem('widget_list');// or getItems($array) to load several cache items
if (!$item->isHit()) {
$item->set($this->computeExpensiveWidgetList());
$pool->save($item);// or saveDeferred() if it can be saved in batch by end of request
}
return $item->get();

}
No need to type hint
against Symfony with this
www.ez.noez.no
Symfony Cache?
www.ez.noez.no
Symfony Cache Component
๏PSR-6 Compliant cache component
๏Aims to be fast, made by Blackfire CTO: Nicolas Grekas
๏Provides several built in cache adapters by default
๏Is progressively being used in several places in Symfony Framework, right now:
๏PropertyInfo
๏Serializer
๏Validator
As per April 2016
See bonus slides at
the end
www.ez.noez.no
Symfony Cache Adapters
๏APCu (per proces cache)
๏Array (in memory per request, mainly for testing)
๏Chain (chain several adapters after each-other)
๏Doctrine
๏FileSystem
๏Proxy (To reuse other PSR-6 implementations)
๏Redis
๏and more being added as we speak..
As per April 2016
See next slide
www.ez.noez.no
Doctrine Cache Providers
๏APC & APCu (per proces cache)
๏Array (in memory per request, mainly for testing)
๏Chain (chain several providers after each-other)
๏Couchbase
๏File & FileSystem & PhpFile
๏Memcache & Memcached
๏MongoDB
๏Redis & Predis
๏Riak
๏SQLite3
๏WinCache
๏Cache
๏ZendCache
As per April 2016
www.ez.noez.no
Cache Libs Comparisons: Features
Stash Doctrine Symfony**
Multi GET X* V V
Hierarchical V X X
Versioning X V X
Namespacing V V V
Tagging X X X
PSR-6 V X V
* Not implemented, interface has existed for long time. ** As of Symfony 3.1
www.ez.noez.no
Cache Libs Comparisons: Backend lookups
Stash* Doctrine** Symfony***
article-42 2 2 1
content/item-42 3 2 1
content/item-42 &
content/item-33 5 2 1
*** W/ native adapters, not Doctrine.* memcached/redis, to compute keys for hierarchical cache. ** With versioning.
Round trips done to backend cache system for a given cache item(s) lookup, esp. important if high latency.
www.ez.noez.no
Next steps for eZ perspective
๏Currently rely on Hierarchical caching to handle cache clearing on related items
๏Lets us clear cache content/55/*, and it will clear all objects we have there
๏However limited when we need to clear cache on tree/batch operations in the CMS
๏eg deleting News/ will in some cases cause all content/* cache being cleared

๏Aiming to use Cache Tagging for this instead in data cache (and HTTPCache*)
๏Example: content-55-version-44 cache item would have tags like:
• content-55
• location-33
• content-type-1 aka Folder
• [ location-path-2, location-path-13, location-path-33 ]
• Will allow us to clear relevant cache much more precisely without cache dog piling
* We already support single tag across Varnish and Symfony Proxy, aim is to support multi tag for all.
www.ez.noez.no
Practical Info
๏Symfony 3.1 is coming end of May 2016

๏eZ working with others to add Tagging support
๏Either in Symfony or in Symfony Community
๏We aim to move to Symfony 3.x for our 2017

releases (earliest December)
๏Interested in talking or

sponsoring Symfony

meetups? 

=> Contact organizers on the

Symfony meetup.com page!
www.ez.noez.no
Bonus #1: Incoming Symfony Cache Adapter
๏OpCache (ongoing PR right now building on work done in Composer v1.1/v2)
www.ez.noez.no
Bonus #2: Autoload performance in Composer.next
ez.no
Bonus #3: Plain Array?
NORMAL DYNAMIC ARRAY
$array = [

$vendorDir.’/symfony/symfony',

$vendorDir.’/ezsystems/ezpublish-kernel'

];
ARRAY USING CONSTANT EXPRESSION
const ARR = [

__DIR__.’/symfony/symfony',

__DIR__.’/ezsystems/ezpublish-kernel'

];
DIFFERENCE?
As of PHP 5.6 with Constant Expressions, opcache I can avoid having to load the array and execute it on each
request by using a constant, as it can be reuse directly from SHM (Shared Memory Cache). On large (Symfony)
installs when using composer “dump-autoload” this class map can be several megabytes which is why this can
have a big impact.



Further reading: http://blog.blackfire.io/speeding-up-autoloading-on-php-5-6-7-0-for-everyone.html
Fin
ez.no

More Related Content

More from André Rømcke

SymfonyCon 2019: Head first into Symfony Cache, Redis & Redis Cluster
SymfonyCon 2019:   Head first into Symfony Cache, Redis & Redis ClusterSymfonyCon 2019:   Head first into Symfony Cache, Redis & Redis Cluster
SymfonyCon 2019: Head first into Symfony Cache, Redis & Redis ClusterAndré Rømcke
 
SfDay 2019: Head first into Symfony Cache, Redis & Redis Cluster
SfDay 2019: Head first into Symfony Cache, Redis & Redis ClusterSfDay 2019: Head first into Symfony Cache, Redis & Redis Cluster
SfDay 2019: Head first into Symfony Cache, Redis & Redis ClusterAndré Rømcke
 
Symfony live London 2018 - Take your http caching to the next level with xke...
Symfony live London 2018 -  Take your http caching to the next level with xke...Symfony live London 2018 -  Take your http caching to the next level with xke...
Symfony live London 2018 - Take your http caching to the next level with xke...André Rømcke
 
Look Towards 2.0 and Beyond - eZ Conference 2016
Look Towards 2.0 and Beyond -   eZ Conference 2016Look Towards 2.0 and Beyond -   eZ Conference 2016
Look Towards 2.0 and Beyond - eZ Conference 2016André Rømcke
 
Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014André Rømcke
 
PhpTour Lyon 2014 - Transparent caching & context aware http cache
PhpTour Lyon 2014 - Transparent caching & context aware http cachePhpTour Lyon 2014 - Transparent caching & context aware http cache
PhpTour Lyon 2014 - Transparent caching & context aware http cacheAndré Rømcke
 
eZ publish 5[-alpha1] Introduction & Architecture
eZ publish 5[-alpha1] Introduction & ArchitectureeZ publish 5[-alpha1] Introduction & Architecture
eZ publish 5[-alpha1] Introduction & ArchitectureAndré Rømcke
 
eZ Publish 5, Re architecture, pitfalls and opportunities
eZ Publish 5, Re architecture, pitfalls and opportunitieseZ Publish 5, Re architecture, pitfalls and opportunities
eZ Publish 5, Re architecture, pitfalls and opportunitiesAndré Rømcke
 

More from André Rømcke (8)

SymfonyCon 2019: Head first into Symfony Cache, Redis & Redis Cluster
SymfonyCon 2019:   Head first into Symfony Cache, Redis & Redis ClusterSymfonyCon 2019:   Head first into Symfony Cache, Redis & Redis Cluster
SymfonyCon 2019: Head first into Symfony Cache, Redis & Redis Cluster
 
SfDay 2019: Head first into Symfony Cache, Redis & Redis Cluster
SfDay 2019: Head first into Symfony Cache, Redis & Redis ClusterSfDay 2019: Head first into Symfony Cache, Redis & Redis Cluster
SfDay 2019: Head first into Symfony Cache, Redis & Redis Cluster
 
Symfony live London 2018 - Take your http caching to the next level with xke...
Symfony live London 2018 -  Take your http caching to the next level with xke...Symfony live London 2018 -  Take your http caching to the next level with xke...
Symfony live London 2018 - Take your http caching to the next level with xke...
 
Look Towards 2.0 and Beyond - eZ Conference 2016
Look Towards 2.0 and Beyond -   eZ Conference 2016Look Towards 2.0 and Beyond -   eZ Conference 2016
Look Towards 2.0 and Beyond - eZ Conference 2016
 
Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014
 
PhpTour Lyon 2014 - Transparent caching & context aware http cache
PhpTour Lyon 2014 - Transparent caching & context aware http cachePhpTour Lyon 2014 - Transparent caching & context aware http cache
PhpTour Lyon 2014 - Transparent caching & context aware http cache
 
eZ publish 5[-alpha1] Introduction & Architecture
eZ publish 5[-alpha1] Introduction & ArchitectureeZ publish 5[-alpha1] Introduction & Architecture
eZ publish 5[-alpha1] Introduction & Architecture
 
eZ Publish 5, Re architecture, pitfalls and opportunities
eZ Publish 5, Re architecture, pitfalls and opportunitieseZ Publish 5, Re architecture, pitfalls and opportunities
eZ Publish 5, Re architecture, pitfalls and opportunities
 

Recently uploaded

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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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
 
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
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Recently uploaded (20)

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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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...
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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)
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Symfony meetup: PSR-6 & Symfony 3.1 Cache Component

  • 1. SYMFONY PHP OSLO MEETUP New in upcoming Symfony 3.1: CACHE COMPONET “PSR-6 Cache, Symfony Cache component, and beyond” André Rømcke - VP Engineering @ezsystems Apr. 20th 2016 - Oslo - Norway Symfony Meetup
  • 2. www.ez.noez.no Me ๏André Rømcke @andrerom ๏VP Engineering at eZ Systems AS, eZ is: Symfony Full stack user & active ecosystem member since 2012 Partner with Sensio Labs (and Blackfire) Open Source CMS for more then 15 years with deep needs for intelligent caching ๏PHP-FIG voting member Currently user of Stash Cache, project that originally initiated PSR-6 Been at times participating in discussions around PSR-6 and Symfony Cache
  • 3. www.ez.noez.no PSR-6? ๏First proposed in Dec 14, 2011, final version approved Dec 8, 2015 ๏Been true several iterations, polls among PHP users/library-providers, .. ๏Will be expanded in the future with additional features as implementations evolves ๏Some known implementations: ๏Stash ๏PHP-Cache ๏Symfony ๏..and many others ๏http://www.php-fig.org/psr/psr-6/
  • 4. www.ez.noez.no PSR-6: Example namespace PsrCacheCacheItemPoolInterface; 
 function getWidgetList(CacheItemPoolInterface $pool)
 {
 $item = $pool->getItem('widget_list');// or getItems($array) to load several cache items if (!$item->isHit()) { $item->set($this->computeExpensiveWidgetList()); $pool->save($item);// or saveDeferred() if it can be saved in batch by end of request } return $item->get();
 } No need to type hint against Symfony with this
  • 6. www.ez.noez.no Symfony Cache Component ๏PSR-6 Compliant cache component ๏Aims to be fast, made by Blackfire CTO: Nicolas Grekas ๏Provides several built in cache adapters by default ๏Is progressively being used in several places in Symfony Framework, right now: ๏PropertyInfo ๏Serializer ๏Validator As per April 2016 See bonus slides at the end
  • 7. www.ez.noez.no Symfony Cache Adapters ๏APCu (per proces cache) ๏Array (in memory per request, mainly for testing) ๏Chain (chain several adapters after each-other) ๏Doctrine ๏FileSystem ๏Proxy (To reuse other PSR-6 implementations) ๏Redis ๏and more being added as we speak.. As per April 2016 See next slide
  • 8. www.ez.noez.no Doctrine Cache Providers ๏APC & APCu (per proces cache) ๏Array (in memory per request, mainly for testing) ๏Chain (chain several providers after each-other) ๏Couchbase ๏File & FileSystem & PhpFile ๏Memcache & Memcached ๏MongoDB ๏Redis & Predis ๏Riak ๏SQLite3 ๏WinCache ๏Cache ๏ZendCache As per April 2016
  • 9. www.ez.noez.no Cache Libs Comparisons: Features Stash Doctrine Symfony** Multi GET X* V V Hierarchical V X X Versioning X V X Namespacing V V V Tagging X X X PSR-6 V X V * Not implemented, interface has existed for long time. ** As of Symfony 3.1
  • 10. www.ez.noez.no Cache Libs Comparisons: Backend lookups Stash* Doctrine** Symfony*** article-42 2 2 1 content/item-42 3 2 1 content/item-42 & content/item-33 5 2 1 *** W/ native adapters, not Doctrine.* memcached/redis, to compute keys for hierarchical cache. ** With versioning. Round trips done to backend cache system for a given cache item(s) lookup, esp. important if high latency.
  • 11. www.ez.noez.no Next steps for eZ perspective ๏Currently rely on Hierarchical caching to handle cache clearing on related items ๏Lets us clear cache content/55/*, and it will clear all objects we have there ๏However limited when we need to clear cache on tree/batch operations in the CMS ๏eg deleting News/ will in some cases cause all content/* cache being cleared
 ๏Aiming to use Cache Tagging for this instead in data cache (and HTTPCache*) ๏Example: content-55-version-44 cache item would have tags like: • content-55 • location-33 • content-type-1 aka Folder • [ location-path-2, location-path-13, location-path-33 ] • Will allow us to clear relevant cache much more precisely without cache dog piling * We already support single tag across Varnish and Symfony Proxy, aim is to support multi tag for all.
  • 12. www.ez.noez.no Practical Info ๏Symfony 3.1 is coming end of May 2016
 ๏eZ working with others to add Tagging support ๏Either in Symfony or in Symfony Community ๏We aim to move to Symfony 3.x for our 2017
 releases (earliest December) ๏Interested in talking or
 sponsoring Symfony
 meetups? 
 => Contact organizers on the
 Symfony meetup.com page!
  • 13. www.ez.noez.no Bonus #1: Incoming Symfony Cache Adapter ๏OpCache (ongoing PR right now building on work done in Composer v1.1/v2)
  • 14. www.ez.noez.no Bonus #2: Autoload performance in Composer.next
  • 15. ez.no Bonus #3: Plain Array? NORMAL DYNAMIC ARRAY $array = [
 $vendorDir.’/symfony/symfony',
 $vendorDir.’/ezsystems/ezpublish-kernel'
 ]; ARRAY USING CONSTANT EXPRESSION const ARR = [
 __DIR__.’/symfony/symfony',
 __DIR__.’/ezsystems/ezpublish-kernel'
 ]; DIFFERENCE? As of PHP 5.6 with Constant Expressions, opcache I can avoid having to load the array and execute it on each request by using a constant, as it can be reuse directly from SHM (Shared Memory Cache). On large (Symfony) installs when using composer “dump-autoload” this class map can be several megabytes which is why this can have a big impact.
 
 Further reading: http://blog.blackfire.io/speeding-up-autoloading-on-php-5-6-7-0-for-everyone.html