Expand my Community achievements bar.

SOLVED

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

Avatar

Level 2

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

1 Accepted Solution

Avatar

Correct answer by
Level 8

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

View solution in original post

4 Replies

Avatar

Correct answer by
Level 8

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

Avatar

Employee

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

Avatar

Level 2

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.

osgi-html-library-manager-conf.PNG

Avatar

Level 2

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