Reputation: 65
Adobe CQ is caching my css for a component I am building. I created a clientlibs folder to add the CSS to the component. Next, I'm using the
<cq:includeClientLib categories="includes" />
tag to include the CSS in my jsp.
How can I disable caching, the CSS in CQ. (I've already cleared the browser cache, it is not a browser cache issue).
Upvotes: 0
Views: 5195
Reputation: 3597
Below is how to do this on AEM 6.1
On AEM-Author you can enable the "Dispatcher Flush" agent to invalidate cache on AEM-publish instance.
The URI will be something like this: http://txpubt01:80/dispatcher/invalidate.cache
Where "txpubt01" is Publish instance server; "80" is the port where Apache is running on "txpubt01 server".
Upvotes: 0
Reputation: 6104
These are just 2 common ways I clear server cache. Hope it helps someone.
Navigate to http://yourdomain.com:4502/etc/replication/agents.author/flush.html and click on Test Connection
.
Open the AEM Tools console. (http://yourdomain.com:4502/miscadmin#/etc)
Open the required replication agent below Tools/replication/Agents on author. You can use the Dispatcher Flush agent that is installed by default.
Click Edit, and in the Settings tab ensure that Enabled is selected.
On the Transport tab, enter the URI needed to access Dispatcher. If you are using the standard Dispatcher Flush agent you will probably need to update the hostname and port; for example, http://:/dispatcher/invalidate.cache
Click OK to activate the agent.
Upvotes: 3
Reputation: 267
If you're using CQ5 with LESS (which is already included), in the Developer console you can execute this:
localStorage.clear()
this will remove your LESS cache.
Upvotes: 1
Reputation: 1747
To disable clientlib mechanism, navigate to felix console yourhost:port/system/console/configMgr
Search for "HTML Library Manager" Check "Debug" and save.
Now all CSS an JS assets are served as single files. Also, all caches are invalidated. Request your page once and switch off "Debug" mode when you are done.
That helps with cached files most of the time. I don't recommend this for production system!
In case you compile your clientlibs through "embed" statements within other clientlibs, edit the css.txt file and append a commented-line. Also remove cached clientlibs below var/clientlibs/etc
Upvotes: 1