Issue with cached html files while using versioned clientlibs

Avatar

Avatar

Teja_G

Avatar

Teja_G

Teja_G

22-02-2018

Hi,

We have tried the versioned clientlibs provided by ACS AEM Commons, it is working as per documentation. We are getting the hashcoded JS/CSS files generated post every deployment (if there are changes related to JS/CSS)

All the pages[.html] which are not cached are picking the latest hash coded js/css files.

It’s not picking the latest hash coded js/css files for the pages[.html] which are cached in dispatcher.

Scenario:

Let’s consider three pages

  1. Home page (Cached in Dispatcher)
  2. Search (Not Cached in Dispatcher)
  3. About us (Not Cached in Dispatcher)

Expected Result:

Whenever there is a deployment all the three pages has to pick the latest hash coded JS/CSS files without clearing the dispatcher cache.

Actual Result:

But in our case post every deployment, when there is a request for home page, it is picking the cached html file (which has reference to old hash coded JS file), since we are caching the home page[.html].

Options we tried are,

  • If we delete the old cached JS/CSS file, then the cached HTML pages are throwing 404 error. (To resolve this we need to clear the cached html files also)
  • It is working fine for the pages that are not cached [.html]

Source link:

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

Note: We are using AEM 6.2 SP1 CFP4 with IIS 8 dispatcher

Regards

Teja G

View Entire Topic

Avatar

Avatar

Teja_G

Avatar

Teja_G

Teja_G

22-02-2018

Yes, Thanks for the reply.

Is there any other feasible way where we can avoid manual clearing cache activity for .html files?

/Teja