AEM As Cloud | SVG images in the clientlibs resources are not picking the cache rules.
Hi Team
I'm hoping someone can help clarify an issue I'm facing with caching SVG assets in ClientLibs. I have implemented rules in the dispatcher (similar to the ones below) that should ideally set a max-age for assets within the ClientLibs loaded via etc.clientlibs. However, when I run a Lighthouse report, I'm not seeing any of the SVG assets in the resources folder being cached properly.
<LocationMatch "^/etc\.clientlibs/.*\.(?i:json|png|gif|jpe?g|svg)$">
Header set Cache-Control "max-age=15780000,s-maxage=86400,stale-while-revalidate=43200,stale-if-error=43200,public"
Header set Age 0
</LocationMatch>
I've verified that:
- The similar rules on other assets in the content/dam folder.
- The SVG assets are located within the resources folder of the ClientLib.
I am not sure if it is not applying only for SVG from etc.clientlibs. or other assets like JPEG or PNG as I do not have such files in resources as of now. I cannot deploy them as this issue is observed in the client server.
AEM version: AEM As Cloud
TIA
Veena✌
