Cloud 5 - Fix Your… Cache
Last update: December 5, 2024
CREATED FOR:
- Intermediate
- Admin
- Developer
In a two-part season two series, we explore some things that you can look at that will speed up your caching on AEM as a Cloud Service.

Transcript
Just to kick things off, where do I get started figuring out if my caching is up to par or not? So the easy answer to that question is there’s a line that will appear in your dispatcher logs on occasion that looks something like this. It’ll give you an idea of how much content is being requested by the dispatcher directly to the published instance versus just being served out of the dispatcher cache only. In a traditional non-CDN based deployment, this ratio becomes very important as low numbers usually equal core performance. And as AEM engineers, we believe that a 99% ratio or better is attainable. That makes a lot of sense. Very useful information, Darren. Thank you. And I have a huge surprise for our viewers. We have a senior cloud architect, Damian, from here at Adobe who is going to address some of my questions here. And Damian, could you kind of just start talking a little bit about the CDN that ships with AEM as a cloud service? I think our viewers would love to know that, some information on that. Sure. First of all, thank you guys both for having me. So the main purpose of the CDN is to reduce latency by delivering cacheable content from the CDN nodes at the edge near the browser. It’s fully managed and configured for optimal performance of AEM applications. And you can check out the season one video on the AEM CDN on the cloud five season one page. Wow, Damian. Fantastic. Glad to hear that you’ve been watching our videos. That is actually one of my favorite ones. Any tips on how we can maximize our cache on the CDN? So first of all, by default, AEM as a cloud service will serve HTML files with an instruction to cache on the CDN for five minutes. And client libs, which include both CSS and JavaScript for much longer. Whenever JavaScript or CSS changes in your customizations, a new client lib URL is used. So you do not have to worry about a stale cache interfering with your recent changes. So all of that is out of the box. If you want to customize things, you can do so by setting cache control headers in the dispatcher vhost files to change that behavior. How would I handle images? So images do not have the same type of instructions as HTML or client libraries, which by default means they’re not globally cached like those files. But this is something that you can control. We do have on the experience league site, a documentation page named caching in AEM as a cloud service. This talks about how to adjust your dispatcher to improve cacheability of your pages. You can vary the cache instructions for images by path, by extension, and other things like that. Wow. Yeah, really useful information. Thank you, Damien. How would I know if my site needs improvement or if it would benefit from more caching? Well, Google has actually written a nice tool named Lighthouse. It’s free. You can score the performance of your site just by running it and it makes recommendations on how to improve your overall site performance. It really is the best place to start. Great. Great. Now I’m going to ask you a specific question on my site. And basically I’m having an issue with overseas visitors. They’re experiencing really slow load times on my AEM as a cloud service site. Any suggestions or tips so I can utilize your expertise here? Yeah, so most often what we’ll see is that this relates to the images topic that we mentioned a minute ago. So if the overseas users are not seeing images delivered from the CDN cache, then it’s quite possible they need to travel all the way overseas. And this introduces latency and it’s just going to be slower. So what you can do, you can have one of your overseas users, you can sort of troubleshoot this together, have them open a browser and open the developer tools. And from there you can check the headers of all the files that are being served. So this will let you, first of all, figure out if it is being cached at the CDN. It’ll also let you see how many seconds or milliseconds each part of the page takes to load. And here on the screen are a couple of quick CDN optimizations you can make in your dispatcher that can help speed things up. Wow. Great tips. Thank you so much for being a guest on the Cloud5 series, Damien. Gladly. Thanks for having me.
Content covered in this video
Additional Resources
Watch related videos on the Cloud 5 season 2 page.
Experience Manager
- Overview
- Playlists
- Introduction to AEM as a Cloud Service
- Experience Cloud integrations
- Underlying Technology
- Edge Delivery Services
- Cloud Manager
- Local Development Environment Setup
- Developing
- Debugging AEM
- AEM APIs
- Content Delivery
- Caching
- Accessing AEM
- Authentication
- Advanced Networking
- Security
- AEM Eventing
- Migration
- Content Transfer Tool
- Bulk Import of assets
- Moving to AEM as a Cloud Service
- Cloud Acceleration Manager
- Content Fragments
- Forms
- Developing for Forms as a Cloud Service
- 1 - Getting started
- 2 - Install IntelliJ
- 3 - Setup Git
- 4 - Sync IntelliJ with AEM
- 5 - Build a form
- 6 - Custom Submit Handler
- 7 - Registering servlet using resource type
- 8 - Enable Forms Portal Components
- 9 - Include Cloud Services and FDM
- 10 - Context aware cloud configuration
- 11 - Push to Cloud Manager
- 12 - Deploy to development environment
- 13 - Updating maven archetype
- Create Adaptive Form
- Custom submit service with headless form
- Create address block component
- Create clickable image component
- AEM Forms and Analytics
- Creating Countries Dropdown Component
- Creating Button Variations
- Using vertical tabs
- Using output and forms service
- Document Generation in AEM Forms CS
- Using Forms Document Services API
- Document Generation using Batch API
- PDF Manipulation in Forms CS
- Integrate with Marketo
- Store Form Submissions with Blob Index Tags
- Prefill core component based form
- Azure Portal Storage
- Save and Resume form filling
- Create Review Workflow
- Acrobat Sign with AEM Forms
- Integrate with Microsoft Power Automate
- Integrate with Microsoft Dynamics
- Integrate with Salesforce
- Store form submissions in one drive and sharepoint
- Developing for Forms as a Cloud Service
- Asset Compute Extensibility
- Multi-step Tutorials
- Expert Resources