Re: Null Cache Storage
Daniel Dekany <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Wednesday, April 20, 2011, 4:04:07 PM, Fernando Ribeiro wrote: > Daniel, > > Thanks for the quick feedback and the new NullCacheStorage class. > I'm currently refreshing the FreeMarker component of the Apache > Camel framework (http://camel.apache.org/), which has its own > implementation of a null cache storage. It was (probably) created > because that component is mostly used with "dynamic" string > templates that the developer really may not want to cache. It's possible to create Template-s from String-s without using Configuration.getTemplate, and be by bypassing the storage mechanism and thus the caching. Also, note that the cache not just decreases I/O, but also prevents the re-parsing of templates. Parsing templates is somewhat expensive (CPU and GC). > Can you please release the current build as 2.3.17? I need it to be > available from Maven to use it in the Apache projects (will also > update ServiceMix to it). I can't just suddenly make a release... If all you need is a NullCacheStorage, your implementation is as good as mine. But if you can give a deadline for me, we can talk about a release. > Thanks, > > 2011/4/20 Daniel Dekany <[email protected]> > Here it is (try it / use it): > http://freemarker.org:8085/download/FM-BRANCH23/artifacts/build-200/Library/freemarker.jar > > > Wednesday, April 20, 2011, 2:45:12 PM, Daniel Dekany wrote: > >> Well... a new MruCacheStorage(0, 0) *should* do that (never tried that >> though), but of course that would be silly. Since you don't have a >> Contributor's License Agreement and this is easy to do, I will just go >> ahead and implement this tonight. >> >> >> Wednesday, April 20, 2011, 1:29:27 PM, Fernando Ribeiro wrote: >> >>> Hello, >>> >>> If I don't want a template loader to use a cache at all, I need to >>> write a new (null) implementation of the CacheStorage interface, >>> right? If so, I can write it and submit it for inclusion, what do you think? >>> >>> Thanks, >>> >>> Fernando >> > > -- > Best regards, > Daniel Dekany > > -- Best regards, Daniel Dekany ------------------------------------------------------------------------------ Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev