users@glassfish.java.net

Re: File Cache

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Mon, 24 Aug 2009 22:29:49 -0400

Salut,

glassfish_at_javadesktop.org wrote:
> 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.

Indeed.

>
>
> 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.

What was the size of the CSS file? It must be bigger than ->
small-file-size-limit-in-bytes="2048"


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

That's the time the file stay in memory before the cache gets released.
Fortunalty in GF v3 we removed those element that comes from Netscape
Server (hey hey) and properly defined them :-) Should be easier to
configure.

A+

--Jeanfrancois


>
>
> thanx,
> Hammoud
> [Message sent by forum member 'hammoud' (hammoud)]
>
> http://forums.java.net/jive/thread.jspa?messageID=359729
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>