velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Esposito" <espos...@newnetco.com>
Subject RE: cache check interval
Date Mon, 09 Jul 2001 18:45:53 GMT
One other reason I wrote the original message was because it took me a while
to figure out the reason why my templates were getting read from disk even
with the caching turned on. I was using the API docs and the contants
defined there to set up my Veloctiy Runtime by hand (rather than with a
properties file) ... after reading the developer's guide on the website, it
was a no-brainer, but the fact that the cache setting is a constant while
the check interval is not was a bit confusing ..

-Dave

> -----Original Message-----
> From: gmj@mta8.srv.hcvlny.cv.net [mailto:gmj@mta8.srv.hcvlny.cv.net]On
> Behalf Of Geir Magnusson Jr.
> Sent: Monday, July 09, 2001 2:40 PM
> To: velocity-user@jakarta.apache.org
> Subject: Re: cache check interval
>
>
> Jonathan Revusky wrote:
> >
> > David Esposito wrote:
> > >
> > > Just curious, is there any reason that
> > > "file.resource.loader.modificationCheckInterval" doesn't have
> a constant
> > > defined in RuntimeConstants like most of the other Velocity
> initialization
> > > parameters?
> > >
> > > I just want to make sure it's OK to be hardcoding it into my
> servlet ..
> > >
> > > -Dave
> >
> > I think the reason is that it has a "natural" default, which is to
> > always check.
> >
>
> Well, it's slightly more complicated than that.  The default is 2
> seconds - the second is the unit for that configuration key, so defining
> a constant didn't seem to make sense.
>
> It will always check with caching off, or another way, this property
> doesn't apply with
>
> file.resource.loader.cache = false
>
> (the default)
>
> because the template is loaded on each request.
>
> geir
>
> --
> Geir Magnusson Jr.                           geirm@optonline.net
> System and Software Consulting
> Developing for the web?  See http://jakarta.apache.org/velocity/
> You have a genius for suggesting things I've come a cropper with!


Mime
View raw message