Adobe Granite HTML Library Manager

Avatar

Avatar

yevhenii_d

Avatar

yevhenii_d

yevhenii_d

22-08-2019

Hi everyone!
There is a feature "htmllibmanager.longcache.patterns" of com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl that allows to mark the clientlib call, but unfortunately it generates stamp only when the service restarts. E.g., with service configuration, I see at the output markup /etc.clientlibs/foo/bar.123.js where 123 is unique value, that generates on service restart.
Basically, clientlib is included through sightly template "/libs/granite/sightly/templates/clientlib.html".
Finally, I want to have new stamp on every UI-related code deploy, to prevent using of alredy cached by browser js or css.
Currently, I have a solution: "${maven.build.timestamp}" but it requires direct path include of the clientlib, that doesn't suit to us, because we are migrating to AEM 6.5 and all clientlibs were moved to /apps structure.
I would be grateful, if you share your own experience, how this objective can be reached.
Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Gaurav-Behl

MVP

Total Posts

1.1K

Likes

226

Correct Answer

281

Avatar

Gaurav-Behl

MVP

Total Posts

1.1K

Likes

226

Correct Answer

281
Gaurav-Behl
MVP

22-08-2019

Check if Versioned ClientLibs helps for your use case

Answers (2)

Answers (2)

Avatar

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

910

Correct Answer

1.0K

Avatar

Jörg_Hoh

Employee

Total Posts

3.0K

Likes

910

Correct Answer

1.0K
Jörg_Hoh
Employee

23-08-2019

What is your need then? I never seen this parameter used.

Avatar

Avatar

yevhenii_d

Avatar

yevhenii_d

yevhenii_d

23-08-2019

It's not exactly what I need