Versioned Clientlibs Dispatcher caching | Community
Skip to main content
October 9, 2023
Solved

Versioned Clientlibs Dispatcher caching

  • October 9, 2023
  • 3 replies
  • 2288 views

I have seen many posts on this but many seem old or potentially outdated as far as what to do. 

 

We are utilizing ACS commons versioned clientlibs. The versioning is working great, but the dispatcher is not recaching the new versioned files. 

 

I have verified that the versioned files are updated from the clientside. But when I navigate to the clientlibs path in the dispatcher, the old versions are still present. I have followed all instructions from different guides on implementing this technique. Is there a commonality or something that stands out that I must be missing on forcing the Dispatcher to cache the new versioned clientlibs?

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 DPrakashRaj

There are various ways to achieve the automation of dispatcher flush

all the above are configurable and you can request the flush to specific paths. As @arunpatidar mentioned client- libs will have new version number with each code change so flushing the aem pages will make a fresh request to updated versioned client-libs, however in this case your cache will still create new client libs file with different versions which eventually fill up the cache directory so would recommend you to do the flush for both client-libs and html or as per your requirements 

3 replies

DPrakashRaj
Community Advisor
Community Advisor
October 9, 2023

I believe your client lib get updated with new code drop and after code drop you don’t see the updated versioned client libs on your dispatcher means your dispatcher is still caching the old cache. So, probably you need a dispatcher flush with each code drop. You can either automate it via a script or you can also use acs-commons dispatcher flush utility to make a flush request on demand.

mmasonWDAuthor
October 10, 2023

Hi Prakash, 

 

Yep, I understand the update to my clientlibs, which is working as expected. I guess it was my understanding, which I am not an expert on, that the Dispatcher would cache the new updated versioned clientlibs. So the dispatcher must still be manually clear then. Is this the normal approach, or is having this automated the typical route? And do you have any documentation or an article to handle this automation for the dispatcher, at least for automatically clearing clientlibs from dispatcher?

DPrakashRaj
Community Advisor
DPrakashRajCommunity AdvisorAccepted solution
Community Advisor
October 10, 2023

There are various ways to achieve the automation of dispatcher flush

all the above are configurable and you can request the flush to specific paths. As @arunpatidar mentioned client- libs will have new version number with each code change so flushing the aem pages will make a fresh request to updated versioned client-libs, however in this case your cache will still create new client libs file with different versions which eventually fill up the cache directory so would recommend you to do the flush for both client-libs and html or as per your requirements 

arunpatidar
Community Advisor
Community Advisor
October 10, 2023

Hi,

Clientlibs cache does not flush with the clientlibs update. Rather the new version of clientlibs is generated as soon as a page request reach to publisher.

The reference of the clientlibs are in the page source

Example

view-source:https://wknd.site/us/en.html

 

 

If you will clear the cache for all the html, then new changes will be appears.

Arun Patidar
Shashi_Mulugu
Community Advisor
Community Advisor
October 10, 2023

@mmasonwd did @arunpatidar @dprakashraj help you? Else please explain further your issue.