[prev in list] [next in list] [prev in thread] [next in thread] 

List:       velocity-user
Subject:    Re: caching the AST node(s)
From:       James Maes <jmaes () sportingnews ! com>
Date:       2001-10-10 19:52:05
[Download RAW message or body]


Sounds doable.  Is there an document discribing this all in detail anywhere.  
I know the todo lists the UML has an item left to finish.  Is my best bet 
just going into the JavaDocs and finding my way?

On Wednesday 10 October 2001 02:43 pm, Geir Magnusson Jr. wrote:
> From: James Maes [mailto:jmaes@sportingnews.com]
>
> > So the cacheing takes place with in the FileResourceLoader
> > class.  If so,
> > great, it will already have to be overwritten due to our
> > storage of the
> > templates.
> >
> > Does it do anything more then just a hash?
>
> No, the caching takes place in the ResourceManager.  But what happens is
> that when someone asks for a resource, the manager
>
> 1) asks the resource if it needs to be checked, as this is set on a loader
> by loader basis, so the resource carries it
> 2) then asks the resource to go check if it needs to be reloaded - the
> resource asks its loader
>
> therefore, your loader can just do smart things like set the modification
> time interval to something small (or 0), and then Do The Right Thing in
> isSourceModified( Resource)
>
> That will keep all the logic contained in your custom loader, and it will
> play nicely with the loader system as is.
>
> geir

-- 
 
------------------------------------
|| James Maes        
|| Senior Programmer 
|| jmaes@sportingnews.com 
|| The Sporting News     
|| www.sportingnews.com 
------------------------------------

"given enough time and resources we can accomplish anything"

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic