Re: WM cache settings

Lane Sharman <[email protected]> Fri, 29 Jul 2005 18:51:10 -0700
Newsgroups gmane.comp.java.webmacro.user
Message-ID <[email protected]>
Hello Nikhil,

About 2 years ago, we had a very intense 
development/dialog/experimentation with caching.  All of this resulted 
in a pluggable architecture. Brian Goetz provided this architecture on 
the whole. I wrote a caching system, which is best called a 
"generational system". I use it in all of my wm apps.

#entry in webmacro.properties:

CachingProvider.template.CacheManager: org.webmacro.resource.GenerationalCacheManager
CachingProvider.url.CacheManager: org.webmacro.resource.GenerationalCacheManager
# Set reloading to true since we are in development mode by default.
GenerationalCacheManager.*.ReloadOnChange: true
# The refresh rate for incorporating changes to the mutable image
GenerationalCacheManager.*.RefreshRate: 1000

The RefreshRate is the most important for performance purposes. It 
means: "if the cache has not been updated for this amt of time, and 
there are stale changes, and there is an idle interval, then replace the 
current generation with a newer generation.".

Since updates occur only to the prospective cache, the current cache is 
read-only and therefore not subject to syncrhonization.

Give it a try!

Lane


Nikhil G. Daddikar wrote:

> Hello,
>
> I have about 1000 templates and am looking for help in setting up the 
> cache settings in WebMacro.properties. Can some one please guide me.
>
> Thanks.
> Nikhil


-- 
Lane Sharman
Providing Private and SPAM-Free Email
http://www.opendoors.com
858-755-2868