Caching Image Renditions in Dispatcher

Avatar

Avatar

sreekalyani

Avatar

sreekalyani

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

 

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

sunjot16

Employee

Avatar

sunjot16

Employee

sunjot16
Employee

22-05-2020

Answers (2)

Answers (2)

Avatar

Avatar

Himanshu_Singhal

MVP

Avatar

Himanshu_Singhal

MVP

Himanshu_Singhal
MVP

22-05-2020

Hi @sreekalyani 
You can try the following approach for Image rendition caching.
http://aempodcast.com/2017/assets/asset-rendition-caching-problem-solution/#.XsevrhMzbxU

 

Thanks,
Himanshu Singhal

Avatar

Avatar

Theo_Pendle

MVP

Avatar

Theo_Pendle

MVP

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