Question

I just recently updated some javascript files in a CQ5.6 instance. I deleted the vars/clientlibs folder so that CQ would regenerate the appropriate files on next page load. When it regenerated them it still included the original javascript. I double checked and both the authoring and publishing instances had the new javascript so I do not know where it is holding onto the old stuff.

So, where does CQ cache the files that it generates its var files from?

No correct solution

OTHER TIPS

CQs clientlibs are cached by the HtmlLibraryManager. Use jad, JDecompiler to see it's implementation.

One workaround I found is to rename the node of the clientlib. So if it is myClientLib, just rename it to myClientLib_somethingelse, then it will use the new js (It cleans HtmlLibraryManager's cache for the clientlib). After then you can rename it back.

Update:

I forgot to mention an url where you can rebuild the clientlibs and here you can also invalidate the cache: /libs/granite/ui/content/dumplibs.rebuild.html. It sometimes fails, but maybe it will work. :D

It is also an useful url for checking clientlibs: /libs/granite/ui/content/dumplibs.html

After deleting the /var/clientlibs cache you may also want to try restarting the Adobe Granite UI Commons (com.day.cq.cq-widgets) bundle from the /system/console/bundles view.

That bundle provides the com.day.cq.widget.impl.HtmlLibraryManagerImpl service, which is responsible for compiling the clientlibs and could theoretically hold some in-memory cache as well.

At one point this was definitely true for the JSP compiler, where removing the /var/classes/org/apache/jsp folder was not enough to force a recompile without also restarting the JSP scripting support bundle.

This is a generic problem, and it will be worst when CSS/JS got cached on client browser. I would recommend to use ACS Commons, Versioned Clientlibs feature in your site to add version number in css/js files. Please refer: http://adobe-consulting-services.github.io/acs-aem-commons/features/versioned-clientlibs.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top