Expandir minha barra de realizações na Comunidade.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

Esta conversa foi bloqueada devido à inatividade. Crie uma nova publicação.

SOLUCIONADO

How to handle dispatcher cache for json and images

Avatar

Level 2

Hi All,

Can you please suggest best or recommended way to write/manage invalidating dispatcher configuration. We have some JSON services (Content fragments exposed as JSON using sling model). when I publish the content fragment, the changes did not reflects until I manually clear the cache. 

 

For now we have below configuration 

/invalidate
{
                   /0000
                          {
                            /glob "*"
                            /type "deny"
                         }
                   /0001
                         {
                                 /glob "*.html"
                                   /type "allow"
                         }
}

 

Please suggest how I can make it work like if I publish the content fragment, the related cached data get clear from dispatcher. 

Also please suggest if I need to add any configuration for dam images as well.

1 Solução aceita

Avatar

Resposta correta de
Community Advisor

Hi @maddy_23 

Instead of completely denying the cache for your JSON by adding dispatcher rules, I would suggest using acs commons dispatcher flush by which you can enable the cache flush in dispatcher at the appropriate path when any changes occur in the content fragment.Please verify it, https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-flush-rules/index.ht...

 

Hope this helps!

Ver solução na publicação original

3 Respostas

Avatar

Community Advisor

Hi @maddy_23 ,

Please try with below invalidation rule

/invalidate
{
/0000
{
/glob "*"
/type "deny"
}
/0001
{
/glob "*.html"
/type "allow"
}
/0002
{
/glob "*.json"
/type "allow"
}
}

Also check similar thread here - https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/not-able-to-invalidate-jso...

We also face cache and invalidation issues with images and their rendition. To overcome this, please check out the below articles.

https://www.linkedin.com/pulse/cacheable-asset-renditions-adobe-experience-manager-mark-daugherty/

https://helpx.adobe.com/in/experience-manager/kb/dispatcher-caching-issue-displaying-image-rendition...

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/dispatcher-image-caching-i...

Regards,

Shiv

Shiv Prakash

Avatar

Resposta correta de
Community Advisor

Hi @maddy_23 

Instead of completely denying the cache for your JSON by adding dispatcher rules, I would suggest using acs commons dispatcher flush by which you can enable the cache flush in dispatcher at the appropriate path when any changes occur in the content fragment.Please verify it, https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-flush-rules/index.ht...

 

Hope this helps!

Avatar

Level 1

I don't think this is a right answer because ACS commons dispatcher flush is not compatible with AEM CaaS - as a cloud service. Rethink for correct answer.