Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Magento 2 Caching Strategies
Search
Marko Martinović
November 24, 2014
Programming
1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Magento 2 Caching Strategies
Meet Magento Poland, Warsaw, November 24th to November 25th 2014.
Marko Martinović
November 24, 2014
More Decks by Marko Martinović
See All by Marko Martinović
Magento 2 performance test toolkit
markomartinovic
1
540
Other Decks in Programming
See All in Programming
分散システム、なんですぐ死んでしまうん?耐障害性を高めたいあなたのためのレジリエンスパターン入門
mshibuya
7
5.5k
フィードバックで育てるAI開発
kotaminato
1
110
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
220
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
170
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
320
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
220
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
240
AIキャラアプリkaiwaの低遅延音声通話基盤をどう作ったか - AWS Gravitonで支える低遅延・低コストAI Agent基盤
mogamit
0
170
スマートグラスで並列バイブコーディング
hyshu
0
280
【やさしく解説 設計編・中級 #1】一つの車に、運転手は一人 ~ある倉庫システムの事例から~
panda728
PRO
0
130
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
480
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
250
Featured
See All Featured
The Limits of Empathy - UXLibs8
cassininazir
1
410
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
180
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Speed Design
sergeychernyshev
33
1.9k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
370
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
Transcript
Meet Magento Poland 2014 Meet Magento Poland 2014 Marko Martinović
Magento 2 Caching Strategies
Meet Magento Poland 2014 2.0 Platform Goals “Improved performance and
scalability”
Meet Magento Poland 2014 Architecture Built on top of Zend_Cache
Meet Magento Poland 2014 Architecture Multiple frontend pools, each associated
to one or two level backend adapter
Meet Magento Poland 2014 Architecture Each cache type with its
own class enforcing specific cache tag
Meet Magento Poland 2014 Frontend Pools Out the box: •
default - General type instances • page_cache - PageCache type instance
Meet Magento Poland 2014 Backend Adapters Cm_Cache_Backend_File as the default
cache backend
Meet Magento Poland 2014 Backend Adapters All the usual suspects,
with MongoDB adapter introduced
Meet Magento Poland 2014 Cache Types Good old • Configuration
• Layouts • Blocks HTML output • Collections data • EAV types and attributes • Translations Brand New • View files fallback • View files pre- processing • Integrations Configuration • Integrations API Configuration • Web Services Configuration • PageCache
Meet Magento Poland 2014 Collections Data Fetch strategy interface with
Query and Cache implementations
Meet Magento Poland 2014 Collections Data Store, Store Group, Website
and Catalog Category collection cached
Meet Magento Poland 2014 EAV Types and Attributes Implemented to
cache eav_entity_type table collection. Still here, still unused, still no one knows why.
Meet Magento Poland 2014 EAV Types and Attributes "One developer
is working on it for a month, other comments it out for testing, third one is then afraid to enable it back" -Ivan Weiler @Inchoo
Meet Magento Poland 2014 View Files Fallback Requested asset is
being searched for using fallback rules applied to fallback context
Meet Magento Poland 2014 View Files Fallback Path to requested
asset resolved and cached
Meet Magento Poland 2014 View Files Pre-processing Pre-processing of Magento-flavoured
CSS tricks like @magento_import, @import, scope notation file references and Less
Meet Magento Poland 2014 View Files Pre-processing Path to pre-processed
asset cached
Meet Magento Poland 2014 PageCache Out the box: • PHP/AJAX
based (Built-in) • Reverse proxy/ESI/AJAX based (Varnish)
Meet Magento Poland 2014 PageCache Caching controlled by ‘Cache-Control’: public,
max-age=XY, s-maxage=XY vs. private, max-age=YZ vs. no-store, no-cache, must-revalidate, max- age=0
Meet Magento Poland 2014 PageCache Setting cacheable=false to some block
results with whole page not being cached
Meet Magento Poland 2014 Hole Punching Setting _isScopePrivate to some
block results with its content not being cached
Meet Magento Poland 2014 Hole Punching Setting ttl to some
block results with its content being served through ESI and cached by Varnish
Meet Magento Poland 2014 Built-in Page cache saved through dedicated
frontend instance by PHP code
Meet Magento Poland 2014 Built-in Dynamic blocks not cached and
served exclusively through AJAX: <!-- BLOCK header --><li class="greet welcome">Default welcome msg!</li><!-- /BLOCK header -->
Meet Magento Poland 2014 Built-in Pros • Works out the
box with no special setup Cons • Leaves a lot to be desired performance- wise
Meet Magento Poland 2014 Varnish
Meet Magento Poland 2014 Varnish Page cache maintained and served
by reverse proxy
Meet Magento Poland 2014 Varnish Without ttl set, dynamic blocks
not cached and served through AJAX
Meet Magento Poland 2014 Varnish With ttl set, dynamic blocks
cached and served through ESI: <esi:include src="..." />
Meet Magento Poland 2014 Varnish Pros • The best performing
caching solution, if properly configured Cons • The worst performing caching solution, if configured improperly • Considerable setup and maintenance overhead • Requires SSL termination proxy to support HTTPS
Meet Magento Poland 2014 Benchmarks Magento 2 (Alpha 102) Magento
EE (1.14.0.1)
Meet Magento Poland 2014 Any questions?
Meet Magento Poland 2014 @MarkoTechyTalk Team Lead/MCD+ at Inchoo Thank
you!