Expand my Community achievements bar.

AEM 6.5.21 AEM ACS Commons 5.3.4 : Clientlibs version not updating with deploy

Avatar

Level 1

Hi all - We are seeing an issue with versioning of clientlib after every deploy. We do not see clientlib cache getting clear which results in previous version# being returned even for an updated js/css file after deploy. We have to manually go and "touch" js.txt/css.txt file to see updated version. If we reduce md5 cache size to 0, we see updated version# after each deploy, this leads me to believe that ACS Commons is not able to update cache after each deploy. Can anyone help?

6 Replies

Avatar

Community Advisor

@MayankSa can you please explain where you are seeing this issue? Author or publisher or dispatcher or CDN?

 

If it is at CDN or load balancer, do you have multiple publishers taking load?

Avatar

Level 1

This issue is on publish servers and has nothing to do with dispatcher/CDN. Issue is that ACS commons is unable to generate a new hash after deployment for clientlibs which is causing issues after deployment as old/stale versioned clientlibs are used

Avatar

Employee Advisor

Hi Mayank,

The issue you're experiencing is related to clientlib caching and versioning in AEM.

Possible Causes:

  1. Clientlib Caching: After deployment, updated clientlibs may not be immediately visible due to caching at both the browser and AEM levels.
  2. Version Hash Not Updating: AEM uses version hashes to manage clientlib updates. If the hash isn't updated due to configuration issues, old files may still be served.
  3. ACS Commons Versioned Clientlibs Conflict: If you're using ACS Commons for versioned clientlibs, it may conflict with AEM’s built-in versioning mechanism, especially in AEM as a Cloud Service.

Solutions:

1. Enable Strict Clientlib Versioning

Ensure that the OSGi configuration for Adobe Granite HTML Library Manager (com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl) has strict clientlib versioning enabled. You can also configure long-term cache keys, such as /.*;auto, in this setting.

2. Rebuild Clientlibs

Rebuilding clientlibs forces AEM to recompile them:

  • Use the /libs/granite/ui/content/dumplibs.rebuild.html endpoint to rebuild libraries. (This is typically restricted to author instances.)
  • For publish instances, you may need assistance from the CSME team to rebuild clientlibs.

Reference Documentation:

Content Consistency and Caching in AEM

 

Avatar

Level 5

I have faced the same issue.

Workaround : Disable the versioning in the ACS Commons Versioned Clientlibs OSGi Config and then enable it back. It will start working.

Possible Solution : AEM supports clientlibs versioning OOTB. Refer - https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/con...

 

Avatar

Level 1

We are not on AEMCaaS, we rely on ACS Common for clientlib versioning. Enabling/disabling versioning with every release is not feasible in production. Hence i reached out to community to understand if others have run into this issue and possible solution

Avatar

Administrator

@MayankSa Did you find the suggestions helpful? Please let us know if you need more information. If a response worked, kindly mark it as correct for posterity; alternatively, if you found a solution yourself, we’d appreciate it if you could share it with the community. Thank you!



Kautuk Sahni