users@glassfish.java.net

File Cache

From: <glassfish_at_javadesktop.org>
Date: Mon, 10 Aug 2009 07:43:18 PDT

Hi all,


tried to enable the file cache of my glassfish 2.1.
But i think i dont understand how this is working.
If i read it correct file cache means that GlassFish puts an copy to memory or virtual memory dependend to file size.


I enabled file cache and set max age to 3600s.
<http-file-cache file-caching-enabled="false" file-transmission-enabled="false" globally-enabled="true" hash-init-size="0" max-age-in-seconds="3600" max-files-count="1024" medium-file-size-limit-in-bytes="537600" medium-file-space-in-bytes="10485760" small-file-size-limit-in-bytes="2048" small-file-space-in-bytes="1048576"/>

Then i changed an CSS file directly in the app directory and called the web page again.
My expectation was that i would get the page with old styles for next 1h, after that time get the new CSS file, but i got the changes at once.


1. Whats wrong?
2. Which request are handeled as static?
3. Is this max age neccessary, would be better cached until next redeploy or?


thanx,
Hammoud
[Message sent by forum member 'hammoud' (hammoud)]

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