From: Sebastian K. <seb...@mu...> - 2004-07-22 10:30:31
|
Hi, On Thursday 22 July 2004 11:38, Endre St=F8lsvik wrote: > On Thu, 22 Jul 2004, Sebastian Kanthak wrote: > | I added a facility to include global macros into every template. Just p= ut > | a space separated list of files you'd like to load macros from into a > | "Macros.Include" configuration setting. See my description on the > | MacroDirective Wiki page. [...] > | Any concerns about this? A unit-test is included. > > These won't ever be reloaded, then? A macro-template won't be reloaded > unless it is timed out, and these won't ever be reloaded? that's true. We'd need to refactor our approach for reloading templates so= =20 that it can support multiple dependencies. Shouldn't be done before 2.0fina= l,=20 I guess. > I'd love to be able to reconfigure everything about WebMacro runtime, > including whether the cache should be cleared etc. I just realized, of > course, that I could potentially just make a entirely new WM instance and > thus that would use all the new configurations, with new cache and all. try broker.getProvider("template").flush() to clear the template cache. > One more user-level question: > How are the templates cached, regarding the other discussion? Are they > cached after they are parsed/compiled? Or are the cache just a cache of > the content of file? Or are there maybe a two-level cache?! I assume the > first, really.. the first, that is Templates are parsed and "compiled" into an internal=20 representation that can be evaluated pretty fast. This representation is=20 cached. If you want to cache the results of evaluating a Template with a=20 Context, you have to do this on your own. Sebastian =2D-=20 Sebastian Kanthak PGP/GnuPG: http://www.muehlheim.de/~skanthak/pgp.html |