Reputation: 93
I have a Plone server that I'm building Diazo themes on. The themes live in a resource directory setup via buildout. Themes show up in Diazo control panel on site, can be enabled and all works as expected. However, when I make any change to the CSS on the file system, these changes do not take effect on the site.
These sites are setup with a dev URL (pointing to a client that is always in development mode). The production URL's to sites on this server are pointing to Varnish/HaProxy, load balanced between the other clients that are not in development mode.
The CSS changes are immediately available on the development URL (bypassing varnish/haproxy). I tried clicking "save" on portal_css in the ZMI in both dev and production URLs I tried reinstalling the theme through the Diazo control panel. I also went as far as restarting the cluster.
My guess is that this is a plone.app.caching issue for us, but I'm unsure.
Looking at the response headers, I see the following (I believe relevent bits) for the CSS document in question:
Cache-Control max-age=86400, proxy-revalidate, public Date Thu, 11 Apr 2013 19:54:33 GMT Expires Fri, 12 Apr 2013 19:33:13 GMT X-Cache-Operation plone.app.caching.strongCaching X-Cache-Rule plone.resource
Any thoughts would be greatly appreciated.
Upvotes: 1
Views: 405
Reputation: 6048
When Plone is in foreground (development) mode, it watches for changes in templates and other file system resources, which are all served individually. When it's not in development mode, it merges (cooks) CSS and JS resources for efficient delivery. That's only done on startup and when resource registry entries change.
For production systems, you need to restart Zope/Plone to register changes in file system resources. You may be able to get your changes seen by forcing the resource registry to re-cook the resources. To do that, visit portal_css in the ZMI and resubmit the resource list form.
Upvotes: 3