This talk was given by Magnolia CIO Jan Haderka at Magnolia Conference 2015 in Basel.
Everyone needs performant sites. The cache allows customers to squeeze more out of existing hardware, or to downgrade their infrastructure while still delivering content fast. They need to be able to fragment a page into cached and non-cached elements, so as to partially cache highly dynamic pages. This talk will explain how Magnolia 5.4 solves the problem: now, users have the choice of different caching solutions depending on their requirements. Further, we made dynamic pages cacheable using component/area caching.
5. 5
Cache?
Just one?
FM TL Cache
Browser Cache
HttpResp Cache
Unsplash
RestReq Cache
RegistriesJR Item Cache
#mconf15 @rah003
6. Cache is a trade-off between perceived
performance of a system, internal resource
allocation and currentness of delivered data
6
Do we need more?
Flickr / Kenny Louie
#mconf15 @rah003
32. 32
Why Memcached?
Flickr / A Syn
double performance when
serving first request*
#mconf15 @rah003
* measured with two public instances connected to same memcached server
53. 53
How?
Flickr / A Syn
•p13n provides variant info into the
cache key
•Each variant gets it’s own cache entry
#mconf15 @rah003
54. 54
Can personalised pages share
fragments?
Flickr / A Syn
Yes, you need to:
• configure such fragment as dynamic
• use custom cache key generator
#mconf15 @rah003
55. 55
Why not to share by default?
Flickr / A Syn
• complexity
• performance
#mconf15 @rah003
70. 70
In summary
Flickr / A Syn
• RenderingListener will inject tags
• SiteMeshFilter will replace tags with
cached (or rendered entries) of content
• SiteMesh lives in the chain before
Cache, so it is all transparent to it
#mconf15 @rah003
71. 71
In summary
Flickr / A Syn
• Page can consist of multiple fragments
with different TTL
• Upon expiration content will be
re-rendered
• Cache filter will cache whatever
requested, fragment or full page#mconf15 @rah003
72. 72
Remember
Flickr / A Syn
The main goal of DPC is improving
performance. This is done by caching
non-dynamic portions of a page
#mconf15 @rah003
73. 73
BEWARE!
Flickr / A Syn
Every dynamic component needs to be
requested separately. That means, more
dynamic components = more time to render.
#mconf15 @rah003
74. 74
BEWARE!
Flickr / A Syn
more dynamic components = slower rendering
Consider excluding such page from the cache!
#mconf15 @rah003
75. 75
BEWARE!
Flickr / A Syn
Although recursive dynamic fragments
are supported, it doesn't make sense to
use this feature unless nested
components have different TTL.
#mconf15 @rah003
76. 76
BEWARE!
Flickr / A Syn
Group of dynamic components
located next to each other
will be rendered faster
in one dynamic area rather than
each separately.
#mconf15 @rah003
77. 77
Say it really works,
Flickr / A Syn
but does it actually scale?
#mconf15 @rah003
84. PersonalizationAnalytics Commerce CRM
www Mobile Site Newsletter Landing PageApp
Integration/Inbound
Multi-Channel OutboundMulti-Channel Outbound
PersonalizationAnalytics Commerce CRM
www Mobile Site Newsletter Landing PageApp
85.
86. 86 Unsplash / Maja Petric
Integrations
Google
Analytics
IBM
Digital
Analytics
AWSJelastic
IBM
Bluemix
Groovy Spring
LDAP
/ADNTLM
Alfresco
Canto
Cumulus
Bright-
cove
Share-
point Photo-
shop
Magento
Hybris
KonaKart
IBM
Smarter
Commerce
Salesforce
SugarCRM
Campaign
Monitor
Click-
density
Eloqua
Optimizely
Steelhouse
Canvas
Atom
/RSS
AddThis
Facebook
Flickr
Share-
This
Twitter
Apache
Solr
Apache
OFBiz
SAP