Disable Caching in Liferay 6.1 (css, js etc)

We have been wondering why our css and js changes failed to take effects after we have deployed our customized theme to the portal. We did a quick search and realize that we need to disable the caching in Liferay (of course another alternative is to start and stop your Liferay).

Key in the following properties in portal-ext.properties (${liferay folder}) and restart your liferay:
theme.css.fast.load=false
theme.images.fast.load=false
javascript.fast.load=true
javascript.log.enabled=false
layout.template.cache.enabled=false
browser.launcher.url=
combo.check.timestamp=true
freemarker.engine.cache.storage=soft:1
freemarker.engine.modification.check.interval=0
openoffice.cache.enabled=false
velocity.engine.resource.manager.cache.enabled=false
com.liferay.portal.servlet.filters.cache.CacheFilter=false
com.liferay.portal.servlet.filters.themepreview.ThemePreviewFilter=true

Above properties can also be located at ${liferay folder}${tomcat folder}webappsROOTWEB-INFclassesportal-developer.properties.

One thought on “Disable Caching in Liferay 6.1 (css, js etc)”

  1. For a production system instead of restarting the app server hosting the portal you also can clear the caches via the control panel.
    In the “Server” section there is a menu item “Server Administration”, using the 4 actions “Clear the database cache”, “Clear content cached by this VM”, “Clear content cached across the cluster” and “Run the garbage collector to free up memory” (in that order) should solve the problem.

Leave a Reply

Your email address will not be published. Required fields are marked *