Adobe Granite HTML Library Manager - Long term client side cache key | Community
Skip to main content
maximen66097493
June 8, 2017
Solved

Adobe Granite HTML Library Manager - Long term client side cache key

  • June 8, 2017
  • 4 replies
  • 3741 views

Hi,

I try to find the documentation related to the Adobe Granite HTML Library Manager OSGI Configuration for the following parameters:

- Long term client side cache key

- Long term cache key format

This seems to be related to the ACS commons feature Versioned ClientLibs  but when looking on the documentation or on internet i can't find any explanation on those parameters.

Best regards,

Maxime Nougarede

DigitasLbi

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 leeasling

It's part of the Apache Configuration.  Documentation is here Versioned ClientLibs

Apache Configuration

To configure Apache to send the right header to set a long TTL:

SetEnvIf Request_URI "(\.min)?\.[a-f0-9]+\.js" long_expires=true 
SetEnvIf Request_URI "(\.min)?\.[a-f0-9]+\.css" long_expires=true
Header set Cache-Control max-age=2592000 env=long_expires

4 replies

leeaslingAccepted solution
June 8, 2017

It's part of the Apache Configuration.  Documentation is here Versioned ClientLibs

Apache Configuration

To configure Apache to send the right header to set a long TTL:

SetEnvIf Request_URI "(\.min)?\.[a-f0-9]+\.js" long_expires=true 
SetEnvIf Request_URI "(\.min)?\.[a-f0-9]+\.css" long_expires=true
Header set Cache-Control max-age=2592000 env=long_expires
Feike_Visser1
Adobe Employee
Adobe Employee
June 8, 2017

This needs to be configured on the webserver like Apache. You can use mod_header for this.

maximen66097493
June 9, 2017

Hi and thanks for your answer,

What i'm looking for is how to make those parameters works on the OSGI Configuration to be ableto generate my CSS and JS with a cache key.

the Apache configuration for the TTL will be done a second time once i achieved the first part.

If they backport the ACS Common feature for Versioned ClientLibs into AEM there must be a documentation somewhere.

Using a 6.2 Instance with the configuration below and after restarting the instance my CSS/JS doesn't have any cache key.

shivanig3560060
June 21, 2017

The answer is not satisfactory.Versioned clientlibs is an additional  thing .How these configurations work on AEM only?