users@glassfish.java.net

setCacheControl doesn't work - Rails app deployed on Glassfish v3

From: <glassfish_at_javadesktop.org>
Date: Fri, 09 Jan 2009 04:05:18 PST

Hi All,

We have a problem with cache control on our glassfish app server.
We are using Sun Glassfish Enterprise Server v3 prelude b28c. We have developed the web application with jRuby 1.1.4 and Rails 2.1.2, and deployed the application
to the Sun Glassfish Server as a folder (not a war file)
In the domain.xml file in the Sun Glassfish Server we set the setCacheControl property to a max-age value of 300 because we want the static content to be kept in the browser cache for 5 minutes (testing value).

<virtual-server ... >
  ...
  <property name="setCacheControl" value="max-age=300" />
</virtual-server>

We restart the app server, run the web app, but in the http response, we see that the cache-control response header is not used at all.
We use Firebug for diagnostics.

Could someone please confirm that this option is indeed supported (tested/verified) on this version of Glassfish. Is there perhaps a known issue regarding this (maybe somehow related to this kind of rails deployment?), or are we simply doing something wrong?

Thanks
[Message sent by forum member 'mileoresko' (mileoresko)]

http://forums.java.net/jive/thread.jspa?messageID=324995