AEM 6.2 Dispatcher not Invalidating the Client Libraries automatically | Community
Skip to main content
New Participant
February 8, 2017
Solved

AEM 6.2 Dispatcher not Invalidating the Client Libraries automatically

  • February 8, 2017
  • 7 replies
  • 4919 views

Hi all,

  Any Changes to the css and js files under the clientlibs is not picked up by the dispatcher. we need clear the dispatcher cache manually to get the latest changes picked up.

Is there any specific configuration to automatically invalidate the css and js files when there is a change?

any suggestions appreciated.

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

Hi,

I would recommend to use ACS AEM Commons' feature "Versioned clientlibs" [1]. Then this is not a problem any more, as changes to any clientlib will result in a different hash value.

regards,
Jörg

[1] https://adobe-consulting-services.github.io/acs-aem-commons/features/versioned-clientlibs.html

7 replies

New Participant
April 6, 2020

There is an add-on for Adobe AEM that does resource fingerprinting (not limited to clientlibs, basically for all static website content), Cache-Control header management and true resource-only flushing of the AEM dispatcher cache. It also deletes updated resources from the dispatcher cache that are not covered by AEM's authoring process (e.g. when you deploy your latest code). A free trial version is available from https://www.browsercachebooster.com/

joerghoh
Employee
August 29, 2017

Hi Ruben,

javascript files typically only change when you deploy code. In that case you are supposed to clear the dispatcher anyway, so the pages get re-rendered using the references to the new javascript files.

The versioned clientlibs allow you only to set an unlimited lifetime (for example an expiration date in 2020) to javascript files.

Jörg

rubenf42159101
New Participant
August 29, 2017

Hi Jorg,

I'm trying to use version clientlibs for similar requirement. Could you please throw some light on how versioned clientlibs work? How does AEM render the HTML / page with new versioned JS reference given the page / html is already cached?

For example, I have home.html cached and referenced with JS version 'footer.min.abc.js'. Now I make a change in my footer.js. New versioned JS will have 'footer.min.xyz.js'. How AEM render the HTML/page with new versioned JS where my home.html is already cached with footer.min.abc.js?

Thanks and Regards,

Ruben Fernando

New Participant
February 14, 2017

Thank you all for the Suggestions. we are clearing the cache manually to solve the issue at present and started looking in to ACS commons .

edubey
New Participant
February 9, 2017

As Jorg mentioned, version clientlib from ACS is a good option. Every time you change some code in css/js. Different filename  for clientlib (clientlib + hashvalue of data) gets generated. and Since its a new file name, dispatcher will will get it from publish.

Thanks

joerghoh
joerghohAccepted solution
Employee
February 8, 2017

Hi,

I would recommend to use ACS AEM Commons' feature "Versioned clientlibs" [1]. Then this is not a problem any more, as changes to any clientlib will result in a different hash value.

regards,
Jörg

[1] https://adobe-consulting-services.github.io/acs-aem-commons/features/versioned-clientlibs.html

Feike_Visser1
Employee
February 8, 2017

You do activate tree ( of the location of the clientlibs) after the change