APACHE SLING FRIENDS TECH MEETUP 2 4 SEPTEMBER
APACHE SLING & FRIENDS TECH MEETUP 2 - 4 SEPTEMBER 2019 Caching the uncacheable Niek Raaijmakers / Luca Nerlich – Adobe Systems
Who are we? Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 2
Niek Raaijmakers § Senior Technical Consultant § Adobe Systems § ACS – Commons § Accenture Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 3
Luca Nerlich § Technical Consultant § Adobe Systems § Core. Media Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 4
Outline Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 5
Outline § 'Http Cache' Overview § Live example § Comparison Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 6
What is it / What does it do? Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 7
Extended Caching Layer § ACS AEM Commons Module § Can cache any HTTP response § ‘Cache the uncacheable’ § leveraging HTTP cache for performant personalization § Complex use cases Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 8
Extended Caching Layer § Feature rich § Extensible § OSGi config based Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 9
Context AEM Publisher Sling Browser Cache CDN Dispatcher Caching the uncacheable – Niek Raaijmakers / Luca Nerlich JCR Oak HTTP Cache 10
Data Flow Base config Find Request Sling Filter Http Cache Engine Stor F e/Fe tch Custom Factory Requires effort Store (of choice) Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 11
Live Example Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 12
Comparison Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 13
Comparison - a little context § Granite HTTP Cache? § ACS AEM Commons HTTP Cache? § What‘s the difference? Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 14
Comparison Matrix Complexity Scalability Caching the uncacheable – Niek Raaijmakers / Luca Nerlich Extensibility Control 15
Comparison Matrix Browser Cache Complexity Scalability Extensibility Control Low Highest None Low Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 16
Comparison Matrix Complexity Scalability Extensibility Control Browser Cache Low Highest None Low CDN Depends Higher None to low Depends Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 17
Comparison Matrix Complexity Scalability Extensibility Control Browser Cache Low Highest None Low CDN Depends Higher None to low Depends Dispatcher Medium High Low Medium Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 18
Comparison Matrix Complexity Scalability Extensibility Control Browser Cache Low Highest None Low CDN Depends Higher None to low Depends Dispatcher Medium High Low Medium Granite HTTP Cache Medium High Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 19
Comparison Matrix Complexity Scalability Extensibility Control Browser Cache Low Highest None Low CDN Depends Higher None to low Depends Dispatcher Medium High Low Medium Granite HTTP Cache Medium Highest AEM Commons High HTTP Cache Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 20
Instrumentation – sling: Osgi. Config Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 22
Base factory configuration § [. . . ]. filter-scope = „INCLUDE“ § [. . . ]. requesturi. patterns = „[ /content/my-site/(. *). html ]“ § cache. Config. Extension. target = § „(&(service. factory. Pid=myfactory) (config. name=myextension. Name)“ § cache. Key. Factory. target = § „(&(service. factory. Pid=myfactory) (config. name=myextension. Name)“ Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 23
Factory Configuration § Resource. Type Factory (ootb) § config. name = „myextension. Name“ § [. . . ]. resourcetypes. allowed = „[/apps/cacheable-comp]“ § [. . . ]. resourcetypes. super. Type = „{Boolean} true“ § myfactory-my. Extension. xml § config. name = „myextension. Name“ § my. Distinct. Property = „adapt. To-2019“ Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 24
Thanks – enjoy the conference! Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 25
Appendix Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 26
References § § https: //adobe-consulting-services. github. io/acs-aem-commons/features/http-cache/index. html https: //github. com/niekraaijmakers/layout-wcm-pages Tutorial Videos § https: //www. youtube. com/user/Sc 0 rpic 0 m/videos https: //helpx. adobe. com/experience-manager/6 -2/sites/developing/using/referencematerials/javadoc/com/adobe/granite/httpcache/api/Cache. Handler. html Caching the uncacheable – Niek Raaijmakers / Luca Nerlich 27
- Slides: 26