SlideShare uma empresa Scribd logo
1 de 35
Baixar para ler offline
Hard Caching
Follow me on Twitter
@bennimack
About myself
• Cache Grinder
• Cash Cow
• Cage Conversion Rater
• Performance Performer
Pronouncing Cache
CashKasch
Cache /ˈkæʃ/ = Käsch
Cage
Casché
Cach
Czech
Katsching
Caching in a nutshell
• Caching is bad
• Not caching is even worse
• Clearing your caches is a workaround
• Clear your caches - or... know what you're doing
Why does it matter?
It becomes my problem
Client changes something in TYPO3, change does
not show in the frontend
vs.
Client complains the site is slow
Why should we cache?
Why should we cache
• Serve data faster that other needs lot of
processing, memory, IO
• Saves the environment! Saves lives!
• Main issue: Get it under control
Caches everywhere
• CDN
• Browser caches
• Server caches
• PHP caches
• TYPO3 caches
• Database caches
• Memory caches
CDN
Browser Cache
Request /products/game-boy-retro/
Response: Valid for 24h
Cache-Control: public

E-Tag: 7eac52c37675360243068dffc49e9351

Expires: 24hs
Browser Cache - 2nd time
Request /products/game-boy-retro/
Response:
You already have it ("ETag")
Browser Cache
Request /products/secret-weapon/
Response: You only get it now
Cache-Control: private

Pragma: no-cache
Browser Cache
Request /products/secret-weapon/
Response: You only get it now
Cache-Control: private

Pragma: no-cache
Browser Cache
Request /products/secret-weapon/
Response
Things can change
• Clear your browser cache?
• Not the problem in the first place
• Ensure that your browser knows what to cache
Things can change
• Just add the tstamp so the browser caches
different variants
<link rel="stylesheet" type="text/css"

href="/typo3conf/ext/site_for_drevil/Resources/
Public/Css/main.css?1499248117">
Developers?
First Hit vs. Cached Hit
TYPO3 Cache - First Hit
Request /products/pampers/
Response
Heavy lifting
TYPO3 Cache - Second Hit
Request /products/pampers/
Response
Done here
About cHash
• Variant of the page that gets a separate cache
entry
• Depends on the additional GET variants
• Some parameters can be excluded in TYPO3
no no no_cache=1
Remember: Save .env
Some things should
never be cached
10 minutes
1 day - 7 daysno_cache!
2 minutes
Caching Framework
Caching Framework - Backends
• APC
• Database
• Filesystem (NFS, HDD, SDD)
• Redis, Memcached
Caching Framework - Part 2
• cache_core (PHP code = files)
• cache_hash
• cache_pages
• cache_pagesection
• cache_rootline
Caching Framework - Part 3
• fluid_template (It's PHP = Files)
• extbase_object (Small => APCu)
• extbase_reflection (Small => APCu)
• extbase_datamapfactory_datamap (Small =>
APCu)
Lessons learned
• Fix the issue, not the symptom
• Save the environment
• Don't cache forever, it will bite you
• Know your system, what it does
• Never use no_cache=1
Go and save goats
... and don't forget to follow me on
twitter @bennimack

Mais conteúdo relacionado

Mais procurados

Top 10 WordPress Plugins
Top 10 WordPress PluginsTop 10 WordPress Plugins
Top 10 WordPress Plugins
Reem Al-Ashry
 
wordpress-performance-presentation
wordpress-performance-presentationwordpress-performance-presentation
wordpress-performance-presentation
Arun Janarthanan
 

Mais procurados (19)

Type URL, Enter, and Then …
Type URL, Enter, and Then …Type URL, Enter, and Then …
Type URL, Enter, and Then …
 
Expert guide for PHP
Expert guide for PHPExpert guide for PHP
Expert guide for PHP
 
Creating Custom Templates for Joomla! 2.5
Creating Custom Templates for Joomla! 2.5Creating Custom Templates for Joomla! 2.5
Creating Custom Templates for Joomla! 2.5
 
04 web optimization
04 web optimization04 web optimization
04 web optimization
 
Speeding Up WordPress sites
Speeding Up WordPress sitesSpeeding Up WordPress sites
Speeding Up WordPress sites
 
Posting Images using Android
Posting Images using AndroidPosting Images using Android
Posting Images using Android
 
World Plone Day 2012 Taipei
World Plone Day 2012 TaipeiWorld Plone Day 2012 Taipei
World Plone Day 2012 Taipei
 
DrupalCamp Baltics: Creating Landing Pages for Drupal 8
DrupalCamp Baltics: Creating Landing Pages for Drupal 8DrupalCamp Baltics: Creating Landing Pages for Drupal 8
DrupalCamp Baltics: Creating Landing Pages for Drupal 8
 
Towards an Alternate WordPress Theme Structure
Towards an Alternate WordPress Theme StructureTowards an Alternate WordPress Theme Structure
Towards an Alternate WordPress Theme Structure
 
Ithemes presentation
Ithemes presentationIthemes presentation
Ithemes presentation
 
Top 10 WordPress Plugins
Top 10 WordPress PluginsTop 10 WordPress Plugins
Top 10 WordPress Plugins
 
HTML 5
HTML 5HTML 5
HTML 5
 
Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)
Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)
Launching a WordPress Site 101 (Cincinnati WordPress, August 2015)
 
High Performance - Joomla!Days NL 2009 #jd09nl
High Performance - Joomla!Days NL 2009 #jd09nlHigh Performance - Joomla!Days NL 2009 #jd09nl
High Performance - Joomla!Days NL 2009 #jd09nl
 
Site building using Drupal 8
Site building using Drupal 8Site building using Drupal 8
Site building using Drupal 8
 
Ui perf
Ui perfUi perf
Ui perf
 
wordpress-performance-presentation
wordpress-performance-presentationwordpress-performance-presentation
wordpress-performance-presentation
 
Your browser, my storage
Your browser, my storageYour browser, my storage
Your browser, my storage
 
Introduction to Wordpress
Introduction to WordpressIntroduction to Wordpress
Introduction to Wordpress
 

Semelhante a Hard Caching in TYPO3 - Developer Days in Malmø 2017

Tuning Your SharePoint Environment
Tuning Your SharePoint EnvironmentTuning Your SharePoint Environment
Tuning Your SharePoint Environment
vmaximiuk
 
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
Nexcess.net LLC
 

Semelhante a Hard Caching in TYPO3 - Developer Days in Malmø 2017 (20)

Mini-Training: To cache or not to cache
Mini-Training: To cache or not to cacheMini-Training: To cache or not to cache
Mini-Training: To cache or not to cache
 
Caching your rails application
Caching your rails applicationCaching your rails application
Caching your rails application
 
Cache Rules Everything Around Me - Momentum - October 2022.pptx
Cache Rules Everything Around Me - Momentum - October 2022.pptxCache Rules Everything Around Me - Momentum - October 2022.pptx
Cache Rules Everything Around Me - Momentum - October 2022.pptx
 
Cache Rules Everything Around Me - DevIntersection - December 2022
Cache Rules Everything Around Me - DevIntersection - December 2022Cache Rules Everything Around Me - DevIntersection - December 2022
Cache Rules Everything Around Me - DevIntersection - December 2022
 
NGINX High-performance Caching
NGINX High-performance CachingNGINX High-performance Caching
NGINX High-performance Caching
 
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
 
Accelerating Rails with edge caching
Accelerating Rails with edge cachingAccelerating Rails with edge caching
Accelerating Rails with edge caching
 
Caching Methodology & Strategies
Caching Methodology & StrategiesCaching Methodology & Strategies
Caching Methodology & Strategies
 
Caching methodology and strategies
Caching methodology and strategiesCaching methodology and strategies
Caching methodology and strategies
 
Rails Caching: Secrets From the Edge
Rails Caching: Secrets From the EdgeRails Caching: Secrets From the Edge
Rails Caching: Secrets From the Edge
 
Rails Caching Secrets from the Edge
Rails Caching Secrets from the EdgeRails Caching Secrets from the Edge
Rails Caching Secrets from the Edge
 
CREAM - That Conference Austin - January 2024.pptx
CREAM - That Conference Austin - January 2024.pptxCREAM - That Conference Austin - January 2024.pptx
CREAM - That Conference Austin - January 2024.pptx
 
Tuning Your SharePoint Environment
Tuning Your SharePoint EnvironmentTuning Your SharePoint Environment
Tuning Your SharePoint Environment
 
Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...Developing High Performance and Scalable ColdFusion Application Using Terraco...
Developing High Performance and Scalable ColdFusion Application Using Terraco...
 
Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...Developing High Performance and Scalable ColdFusion Applications Using Terrac...
Developing High Performance and Scalable ColdFusion Applications Using Terrac...
 
Advanced Drupal 8 Caching
Advanced Drupal 8 CachingAdvanced Drupal 8 Caching
Advanced Drupal 8 Caching
 
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
 
Speed Matters
Speed MattersSpeed Matters
Speed Matters
 
Less and faster – Cache tips for WordPress developers
Less and faster – Cache tips for WordPress developersLess and faster – Cache tips for WordPress developers
Less and faster – Cache tips for WordPress developers
 
VMworld 2013: Extreme Performance Series: Storage in a Flash
VMworld 2013: Extreme Performance Series: Storage in a Flash VMworld 2013: Extreme Performance Series: Storage in a Flash
VMworld 2013: Extreme Performance Series: Storage in a Flash
 

Último

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+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@
 
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
 
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
 

Último (20)

Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
+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...
 
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
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 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
 
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
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
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
 

Hard Caching in TYPO3 - Developer Days in Malmø 2017