From: Lane S. <la...@op...> - 2003-01-16 19:38:31
|
The api docs are really good at a discussion. Also, there is a discussion on the wiki site. Sometimes I refer to it as a VeryFastCache because the cache is immutable and therefore can be used unsynchronized. It is pluggable drop. I have been using it for one year without error. -Lane Jeff Cowan wrote: >Lane, thanks for the info. We'll work it into the next set of tests that we >do. > >Can you point me at some documentation about how the >GenerationalCacheManager works or what it's key / differentiating features >are? > >Regards, >Jeff > >-----Original Message----- >From: Lane Sharman [mailto:la...@op...] >Sent: Tuesday, January 14, 2003 8:08 PM >To: Jeff Cowan >Cc: 'web...@li...' >Subject: Re: [Webmacro-devel] Bad interaction with TimeLoop and cache >times? > > >Hi Jeff, > >One of the many beauties of WebMacro is pluggability. > >About six months ago, we wrote a pluggable interface for the caching >after some really hot debate about synchronization. I have been using >exclusively an alternative cache manager which stems from my early days >writing VM paging and kernel systems. It is a generational caching >manager which can be configured as follows 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 >========================== > >Would you mind copying the above into your WebMacro.properties file and >seeing if you get some better performance or more control over your >memory utilization and let me know. (Change the last parameter measured >in millis to extend your mileage :). > >Gracie, > >Lane > >Jeff Cowan wrote: > > > >>Hello all. My name is Jeff and I work with Glenn Shute at Altavista. He >>suggested I drop a note here about something I've been looking at in >>WebMacro. We're running WM 1.0.1 still, so maybe this is already fixed or a >>warning has been put out already. >> >>I observed during some tests (memory profiling) that some templates were >>being parsed repeatedly when they should have already been cached. I >> >> >checked > > >>my cache timeout settings in WebMacro.defaults. They are: >> >>SMapCacheManager.*.ExpireTime: 600000 >>SMapCacheManager.*.ReloadOnChange: false >> >>So, I would expect that once a template was acquired successfully, it >> >> >should > > >>be cached for 10 minutes. Looking more deeply, it appears that the TimeLoop >>class that is responsible for purging the template cache of stale templates >>has 600 periods of 1000ms each (again, 10 minutes). >> >>Setting LogLevel.resource to DEBUG, I observed that the template would be >>aquired, cached and subsequently deleted from the cache almost right away. >>It appears that when the period to run the task in is being computed in my >>particular case, it is possible that the period in question is the one that >>is about to run right at that moment. This would only happen in the case >>where the periods corresponded to the ExpireTime, due to modulo arithmetic. >>Eventually, if I continue reloading the page, all the templates get cached >>successfully. This kind of error is a subtle timing issue, so the results >>are different every time. >> >>In our case, we can change the ExpireTime to 599000 and that seems to fix >>it. I understand that this isn't really a bug. Just thought you might be >>interested. >> >>Regards, >>Jeff Cowan >>Altavista Company >>email: jeff <d o t> cowan <a t> av <d o t> com >> >> >> >> >> >>------------------------------------------------------- >>This SF.NET email is sponsored by: Take your first step towards giving >>your online business a competitive advantage. Test-drive a Thawte SSL >>certificate - our easy online guide will show you how. Click here to get >>started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en >>_______________________________________________ >>Webmacro-devel mailing list >>Web...@li... >>https://lists.sourceforge.net/lists/listinfo/webmacro-devel >> >> >> >> >> > > > -- Lane Sharman http://opendoors.com Conga, GoodTimes and Application Hosting Services http://opendoors.com/lane.pdf BIO |