Caching Image Renditions in Dispatcher

sreekalyani

22-05-2020

Hi,

 

i am facing a problem like not able to cache image renditions. Added a dispatcher for the author for performance improvement.

In Dispatcher cache i have given statlevel as 4

sreekalyani_0-1590138565748.png

and the cache rule i have given to cache all the files under a project for example "react_aem_spa".

sreekalyani_1-1590138650502.png

and also under invalidate rule

sreekalyani_2-1590138694068.png

 

When i am trying to access http://localhost/content/dam/react_aem_spa/hiking_4.jpg the image is getting cached but when i am trying to access the rendition say http://localhost/content/dam/react_aem_spa/hiking_4.jpg/jcr:content/renditions/cq5dam.thumbnail.140....  they are not getting cached.

 

Are there any configurations specifically to do so as to cache the renditions as well.

And also when i am trying to edit the tags in damadmin console for the image they are not being autoinvalidated. 

Can anyone let me know what has to be done.

 

Regards,

Sree

 

 

 

Answers (2)

Answers (2)

Theo_Pendle

MVP

22-05-2020

Hi @sreekalyani,

I'm no Dispatcher expert but I think the issue is with your glob expression.

If we take the two paths you provided:

/content/dam/react_aem_spa/hiking_4.jpg 
/content/dam/react_aem_spa/hiking_4.jpg/jcr:content/renditions/cq5dam.thumbnail.140.100.png

The following glob only matches the first asset:

/content/dam/react_aem_spa/*.*

Instead I think you should be using this glob which matches both assets:

/content/dam/react_aem_spa/**

I'm a regex man and I've always disliked globs, which is why I use https://globster.xyz/ to double-check my globs 😉 Have a look!

Matches one:

Selection_014.jpg

Matches all:

Selection_015.jpg