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 19:18:05 GMT
yes, that's what i meant ... ;) ...

i don't quite follow what you mean when you say: "if we were clever, these
would be constants defined by the loader that they are specific to, not in
general."

you mean the fact that you could have a FileResourceLoader and a
JarResourceLoader and each might have different cache/checkInterval
settings?

-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 3:02 PM
> To: velocity-user@jakarta.apache.org
> Subject: Re: cache check interval
>
>
> David Esposito wrote:
> >
> > 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 ..
>
> Oh!  I stared at what you just wrote for a while before it parsed...
>
> For the property/key itself : something like
>
>  public static final String FILE_RESOURCE_LOADER_MODCHECKINTERVAL =
>         "file.resource.loader.modcheckinterval";
>
>
> Yes - consider it there for completeness.  I will get it in today.  I
> was thinking you wanted a constant representation for '2'
>
> Actually, if we were clever, these would be constants defined by the
> loader that they are specific to, not in general.  However, we bear the
> burden of history :)
>
> Going forward, we should try to push them that way.
>
> geir
>
> >
> > > -----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!
>
> --
> 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