SlideShare a Scribd company logo
1 of 14
Download to read offline
Varnish in Magento 2
By Toon Van Dooren
Varnish?
Varnish Webserver
MissHIT
Cache invalidation
Ban Purge
Intelligent cache invalidation Direct invalidation
Cache object exists until it is fetched from
backend
Instant object removal from cache
Exists until older than the oldest cache
object
Does not stay in memory
Everything that is known to Varnish (URLs,
IPs, Headers, …)
URLs
Cache invalidation
- Content tagging
- Object Identifiers in header
- X-Magento-Tags: catalog_product_14
- Ban specific objects
- ban obj.http.X-Magento-Tags ~ “catalog_product_14”
- Useful for
- Objects that can exist in multiple pages
- Paginated and sorted content
- Search pages
Hole punching
Esi Ajax
Has impact on pageload Async
Processed by Varnish + Webserver Processed by browser + web server
Private or public User specific (private)
Usage: crucial elements (navigation) Usage: independent elements (top cart)
Hole punching
- Avoid permanent hole punches
- Events: add to cart, login, …
- Leverage local storage or lifetimes combined
with bans
- Avoid unnecessary hole punches
- Does this content need to be invalidated?
- Local storage: https://github.com/toonvd/magento-localstorage-recentlyviewed
Magento 2 functionalities
- Purge to ban
- Esi for shorter lifetimes
- Ajax + local storage for hole punching
- Content tagging
- Segmentation
- Caching static content
Purge to ban
ESI
MagentoPageCacheControllerBlockEsi
Ajax + localstorage
- Localstorage
- mage-cache-storage
- mage-cache-storage-section-invalidation
- mage-cache-timeouts
- Copies localstorage content to placeholder
- Event -> ajax call -> localstorage -> copy
- customer-data.js
Content tagging
- X-Magento-Tags
- Data object name + id
- Object models extend IdentityInterface
- MagentoFrameworkDataObjectIdentityInterface
- getIdentities returns a string with tags
- Abstractblock adds tags
- MagentoFrameworkViewElementAbstractBlock
- Purgecache model purges tags on object save
- MagentoCacheInvalidateModelPurgeCache
Segmentation
- X-Magento-Vary
- Plugin around http context dispatch
- MagentoFrameworkAppHttpContext
- Set value to add it to the header
- Context class hashes all set values
- HTTP class adds the vary header
- Vary header is added to Varnish hash
Before you begin
- Varnish is not the holy grail of performance
- Optimize your backend first!
- Do not use Varnish to hide bad coding
- Learn how to read / use Varnish Configuration Language
- Know your subroutines
- Know how to utilize them
- Personalise your VCL based on your needs
- Composing your VCL is not a sysadmin task!
- Decide whether you will cache static content
- Do you have enough RAM?
- Globalization needed? (Content Delivery Network)
Questions?
- Varnish?
- Cache invalidation
- Hole punching
- Varnish in Magento 2
- Functionalities + Quick dive
- Purge to ban
- ESI
- Ajax + local storage
- Content tagging
- Segmentation

More Related Content

What's hot

Persistent Offline Storage White
Persistent Offline Storage WhitePersistent Offline Storage White
Persistent Offline Storage White
Alexei White
 
Lt local storage
Lt local storageLt local storage
Lt local storage
Yuzu Saijo
 

What's hot (10)

ASP.NET View State - Security Issues
ASP.NET View State - Security IssuesASP.NET View State - Security Issues
ASP.NET View State - Security Issues
 
Persistent Offline Storage White
Persistent Offline Storage WhitePersistent Offline Storage White
Persistent Offline Storage White
 
Ecom2
Ecom2Ecom2
Ecom2
 
Advance Java
Advance JavaAdvance Java
Advance Java
 
WS-* with WCF
WS-* with WCFWS-* with WCF
WS-* with WCF
 
When dynamic becomes static - the next step in web caching techniques
When dynamic becomes static - the next step in web caching techniquesWhen dynamic becomes static - the next step in web caching techniques
When dynamic becomes static - the next step in web caching techniques
 
Browser Internals-Same Origin Policy
Browser Internals-Same Origin PolicyBrowser Internals-Same Origin Policy
Browser Internals-Same Origin Policy
 
Real World Caching with Ruby on Rails
Real World Caching with Ruby on RailsReal World Caching with Ruby on Rails
Real World Caching with Ruby on Rails
 
Varnish Cache and its usage in the real world!
Varnish Cache and its usage in the real world!Varnish Cache and its usage in the real world!
Varnish Cache and its usage in the real world!
 
Lt local storage
Lt local storageLt local storage
Lt local storage
 

Viewers also liked

Ahmed Abdel-Mawla Abdel-Hamid (CV)
Ahmed Abdel-Mawla Abdel-Hamid (CV)Ahmed Abdel-Mawla Abdel-Hamid (CV)
Ahmed Abdel-Mawla Abdel-Hamid (CV)
Ahmed Hassan
 

Viewers also liked (11)

Ahmed Abdel-Mawla Abdel-Hamid (CV)
Ahmed Abdel-Mawla Abdel-Hamid (CV)Ahmed Abdel-Mawla Abdel-Hamid (CV)
Ahmed Abdel-Mawla Abdel-Hamid (CV)
 
Salones para Bodas en Malaga | Hacienda Romeral del Rocio
Salones para Bodas en Malaga | Hacienda Romeral del RocioSalones para Bodas en Malaga | Hacienda Romeral del Rocio
Salones para Bodas en Malaga | Hacienda Romeral del Rocio
 
Lição 10 juvenil 2° trimestre 2015
Lição 10 juvenil   2° trimestre 2015Lição 10 juvenil   2° trimestre 2015
Lição 10 juvenil 2° trimestre 2015
 
Presentación biodiversidad, contaminación y manejo de residuos sulma aular
Presentación biodiversidad, contaminación y manejo de residuos sulma aularPresentación biodiversidad, contaminación y manejo de residuos sulma aular
Presentación biodiversidad, contaminación y manejo de residuos sulma aular
 
Zodiac Health and Wellness Personality Development Workshop by Amb Juan
Zodiac Health and Wellness Personality Development Workshop by Amb Juan Zodiac Health and Wellness Personality Development Workshop by Amb Juan
Zodiac Health and Wellness Personality Development Workshop by Amb Juan
 
Peshawar attack
Peshawar attackPeshawar attack
Peshawar attack
 
Bridging the Gap to Productivity TEAM BUILDING WORKSHOP by Amb Juan
Bridging the Gap to Productivity TEAM BUILDING WORKSHOP by Amb JuanBridging the Gap to Productivity TEAM BUILDING WORKSHOP by Amb Juan
Bridging the Gap to Productivity TEAM BUILDING WORKSHOP by Amb Juan
 
Mechanical project @sris
Mechanical project @srisMechanical project @sris
Mechanical project @sris
 
Abdomen agudo qx en pediatría
Abdomen agudo qx en pediatríaAbdomen agudo qx en pediatría
Abdomen agudo qx en pediatría
 
Vertebrates
VertebratesVertebrates
Vertebrates
 
Hack wifi password using kali linux
Hack wifi password using kali linuxHack wifi password using kali linux
Hack wifi password using kali linux
 

Similar to Magento 2 Seminar - Toon van Dooren - Varnish in Magento 2

High Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practicesHigh Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practices
Stoyan Stefanov
 
Offline strategies for HTML5 web applications - ConFoo13
Offline strategies for HTML5 web applications - ConFoo13Offline strategies for HTML5 web applications - ConFoo13
Offline strategies for HTML5 web applications - ConFoo13
Stephan Hochdörfer
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
FIWARE
 

Similar to Magento 2 Seminar - Toon van Dooren - Varnish in Magento 2 (20)

High Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practicesHigh Performance Web Pages - 20 new best practices
High Performance Web Pages - 20 new best practices
 
HTML5와 모바일
HTML5와 모바일HTML5와 모바일
HTML5와 모바일
 
Иван Чепурный - Meet Magento Ukraine - Varnish Cache and its usage in the rea...
Иван Чепурный - Meet Magento Ukraine - Varnish Cache and its usage in the rea...Иван Чепурный - Meet Magento Ukraine - Varnish Cache and its usage in the rea...
Иван Чепурный - Meet Magento Ukraine - Varnish Cache and its usage in the rea...
 
Offline strategies for HTML5 web applications - ConFoo13
Offline strategies for HTML5 web applications - ConFoo13Offline strategies for HTML5 web applications - ConFoo13
Offline strategies for HTML5 web applications - ConFoo13
 
Local storage
Local storageLocal storage
Local storage
 
Dandelion 0.10.0
Dandelion 0.10.0Dandelion 0.10.0
Dandelion 0.10.0
 
Presentation Tier optimizations
Presentation Tier optimizationsPresentation Tier optimizations
Presentation Tier optimizations
 
Présentation du générateur de site statique eleventy
Présentation du générateur de site statique eleventyPrésentation du générateur de site statique eleventy
Présentation du générateur de site statique eleventy
 
Develop Engaging and High Performance Portal Themes That Power Exceptional Di...
Develop Engaging and High Performance Portal Themes That Power Exceptional Di...Develop Engaging and High Performance Portal Themes That Power Exceptional Di...
Develop Engaging and High Performance Portal Themes That Power Exceptional Di...
 
Accelerating Rails with edge caching
Accelerating Rails with edge cachingAccelerating Rails with edge caching
Accelerating Rails with edge caching
 
Using html5 to build offline applications
Using html5 to build offline applicationsUsing html5 to build offline applications
Using html5 to build offline applications
 
Always on! Or not?
Always on! Or not?Always on! Or not?
Always on! Or not?
 
Caching in WordPress
Caching in WordPressCaching in WordPress
Caching in WordPress
 
RESTful Web Applications with Apache Sling
RESTful Web Applications with Apache SlingRESTful Web Applications with Apache Sling
RESTful Web Applications with Apache Sling
 
Sitecore Personalization on websites cached on CDN servers
Sitecore Personalization on websites cached on CDN serversSitecore Personalization on websites cached on CDN servers
Sitecore Personalization on websites cached on CDN servers
 
RESS – Responsive Webdesign and Server Side Components
RESS – Responsive Webdesign and Server Side ComponentsRESS – Responsive Webdesign and Server Side Components
RESS – Responsive Webdesign and Server Side Components
 
Resource registries plone conf 2014
Resource registries plone conf 2014Resource registries plone conf 2014
Resource registries plone conf 2014
 
Modular android Project
Modular android ProjectModular android Project
Modular android Project
 
Rails for Mobile Devices @ Conferencia Rails 2011
Rails for Mobile Devices @ Conferencia Rails 2011Rails for Mobile Devices @ Conferencia Rails 2011
Rails for Mobile Devices @ Conferencia Rails 2011
 
Developing your first application using FIWARE
Developing your first application using FIWAREDeveloping your first application using FIWARE
Developing your first application using FIWARE
 

More from Yireo

More from Yireo (20)

Faster Magento Integration Tests
Faster Magento Integration TestsFaster Magento Integration Tests
Faster Magento Integration Tests
 
Mage-OS Nederland
Mage-OS NederlandMage-OS Nederland
Mage-OS Nederland
 
Modernizing Vue Storefront 1
Modernizing Vue Storefront 1Modernizing Vue Storefront 1
Modernizing Vue Storefront 1
 
Magento 2 Seminar - Peter-Jaap Blaakmeer - VR-webshop
Magento 2 Seminar - Peter-Jaap Blaakmeer - VR-webshopMagento 2 Seminar - Peter-Jaap Blaakmeer - VR-webshop
Magento 2 Seminar - Peter-Jaap Blaakmeer - VR-webshop
 
Magento 2 Seminar - Andra Lungu - API in Magento 2
Magento 2 Seminar - Andra Lungu - API in Magento 2Magento 2 Seminar - Andra Lungu - API in Magento 2
Magento 2 Seminar - Andra Lungu - API in Magento 2
 
Magento 2 Seminar - Roger Keulen - Machine learning
Magento 2 Seminar - Roger Keulen - Machine learningMagento 2 Seminar - Roger Keulen - Machine learning
Magento 2 Seminar - Roger Keulen - Machine learning
 
Magento 2 Seminar - Miguel Balparda - M2 with PHP 7 and Varnish
Magento 2 Seminar - Miguel Balparda - M2 with PHP 7 and VarnishMagento 2 Seminar - Miguel Balparda - M2 with PHP 7 and Varnish
Magento 2 Seminar - Miguel Balparda - M2 with PHP 7 and Varnish
 
Magento 2 Seminar - Maarten Schuiling - The App Economy
Magento 2 Seminar - Maarten Schuiling - The App EconomyMagento 2 Seminar - Maarten Schuiling - The App Economy
Magento 2 Seminar - Maarten Schuiling - The App Economy
 
Magento 2 Seminar - Jisse Reitsma - Magento 2 techniek vertalen naar voordelen
Magento 2 Seminar - Jisse Reitsma - Magento 2 techniek vertalen naar voordelenMagento 2 Seminar - Jisse Reitsma - Magento 2 techniek vertalen naar voordelen
Magento 2 Seminar - Jisse Reitsma - Magento 2 techniek vertalen naar voordelen
 
Magento 2 Seminar - Sander Mangel - Van Magento 1 naar 2
Magento 2 Seminar - Sander Mangel - Van Magento 1 naar 2Magento 2 Seminar - Sander Mangel - Van Magento 1 naar 2
Magento 2 Seminar - Sander Mangel - Van Magento 1 naar 2
 
Magento 2 Seminar - Arjen Miedema - Search Engine Optimisation
Magento 2 Seminar - Arjen Miedema - Search Engine OptimisationMagento 2 Seminar - Arjen Miedema - Search Engine Optimisation
Magento 2 Seminar - Arjen Miedema - Search Engine Optimisation
 
Magento 2 Seminar - Tjitte Folkertsma - Beaumotica
Magento 2 Seminar - Tjitte Folkertsma - BeaumoticaMagento 2 Seminar - Tjitte Folkertsma - Beaumotica
Magento 2 Seminar - Tjitte Folkertsma - Beaumotica
 
Magento 2 Seminar - Jeroen Vermeulen Snelle Magento 2 Shops
Magento 2 Seminar - Jeroen Vermeulen  Snelle Magento 2 ShopsMagento 2 Seminar - Jeroen Vermeulen  Snelle Magento 2 Shops
Magento 2 Seminar - Jeroen Vermeulen Snelle Magento 2 Shops
 
Magento 2 Seminar - Christian Muench - Magerun2
Magento 2 Seminar - Christian Muench - Magerun2Magento 2 Seminar - Christian Muench - Magerun2
Magento 2 Seminar - Christian Muench - Magerun2
 
Magento 2 Seminar - Anton Kril - Magento 2 Summary
Magento 2 Seminar - Anton Kril - Magento 2 SummaryMagento 2 Seminar - Anton Kril - Magento 2 Summary
Magento 2 Seminar - Anton Kril - Magento 2 Summary
 
Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks
Magento 2 Seminar - Daniel Genis - Magento 2 benchmarksMagento 2 Seminar - Daniel Genis - Magento 2 benchmarks
Magento 2 Seminar - Daniel Genis - Magento 2 benchmarks
 
Magento 2 Seminar - Ben Marks - Keynote
Magento 2 Seminar - Ben Marks - KeynoteMagento 2 Seminar - Ben Marks - Keynote
Magento 2 Seminar - Ben Marks - Keynote
 
Magento 2 Seminar - Community agenda
Magento 2 Seminar - Community agendaMagento 2 Seminar - Community agenda
Magento 2 Seminar - Community agenda
 
Magento 2 Seminar - Jisse Reitsma - Migratie Planning
Magento 2 Seminar - Jisse Reitsma - Migratie PlanningMagento 2 Seminar - Jisse Reitsma - Migratie Planning
Magento 2 Seminar - Jisse Reitsma - Migratie Planning
 
Magento 2 Seminar - Welkom
Magento 2 Seminar - WelkomMagento 2 Seminar - Welkom
Magento 2 Seminar - Welkom
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Magento 2 Seminar - Toon van Dooren - Varnish in Magento 2

  • 1. Varnish in Magento 2 By Toon Van Dooren
  • 3. Cache invalidation Ban Purge Intelligent cache invalidation Direct invalidation Cache object exists until it is fetched from backend Instant object removal from cache Exists until older than the oldest cache object Does not stay in memory Everything that is known to Varnish (URLs, IPs, Headers, …) URLs
  • 4. Cache invalidation - Content tagging - Object Identifiers in header - X-Magento-Tags: catalog_product_14 - Ban specific objects - ban obj.http.X-Magento-Tags ~ “catalog_product_14” - Useful for - Objects that can exist in multiple pages - Paginated and sorted content - Search pages
  • 5. Hole punching Esi Ajax Has impact on pageload Async Processed by Varnish + Webserver Processed by browser + web server Private or public User specific (private) Usage: crucial elements (navigation) Usage: independent elements (top cart)
  • 6. Hole punching - Avoid permanent hole punches - Events: add to cart, login, … - Leverage local storage or lifetimes combined with bans - Avoid unnecessary hole punches - Does this content need to be invalidated? - Local storage: https://github.com/toonvd/magento-localstorage-recentlyviewed
  • 7. Magento 2 functionalities - Purge to ban - Esi for shorter lifetimes - Ajax + local storage for hole punching - Content tagging - Segmentation - Caching static content
  • 10. Ajax + localstorage - Localstorage - mage-cache-storage - mage-cache-storage-section-invalidation - mage-cache-timeouts - Copies localstorage content to placeholder - Event -> ajax call -> localstorage -> copy - customer-data.js
  • 11. Content tagging - X-Magento-Tags - Data object name + id - Object models extend IdentityInterface - MagentoFrameworkDataObjectIdentityInterface - getIdentities returns a string with tags - Abstractblock adds tags - MagentoFrameworkViewElementAbstractBlock - Purgecache model purges tags on object save - MagentoCacheInvalidateModelPurgeCache
  • 12. Segmentation - X-Magento-Vary - Plugin around http context dispatch - MagentoFrameworkAppHttpContext - Set value to add it to the header - Context class hashes all set values - HTTP class adds the vary header - Vary header is added to Varnish hash
  • 13. Before you begin - Varnish is not the holy grail of performance - Optimize your backend first! - Do not use Varnish to hide bad coding - Learn how to read / use Varnish Configuration Language - Know your subroutines - Know how to utilize them - Personalise your VCL based on your needs - Composing your VCL is not a sysadmin task! - Decide whether you will cache static content - Do you have enough RAM? - Globalization needed? (Content Delivery Network)
  • 14. Questions? - Varnish? - Cache invalidation - Hole punching - Varnish in Magento 2 - Functionalities + Quick dive - Purge to ban - ESI - Ajax + local storage - Content tagging - Segmentation