From: Sebastian K. <seb...@mu...> - 2004-07-22 19:27:36
|
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. > 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? I thought about this and tried changing my implementation a bit, so that th= e=20 global library templates are loaded from every template (possibly from the= =20 cache of course) instead of once at initialization time. This would allow=20 changes in the libraries to take effect, once a normal template expires fro= m=20 the cache. However, doing this the straightforward way results in a StackOverflow,=20 because the global libraries try to include themselves... What I need is a= =20 way to tell them: "Hey, you're a global library, don't try to include the=20 global libraries!" I thought about 3 possibilities: 1) A ThreadLocal variable. Ugly hack, but should work 2) Changes to the provider interface to be able to pass additional=20 informations like the above 3) A requirement to put a tag like "$globalMacroLibrary =3D 1" into the=20 libraries Neither of the three seems nice to me, so does anybody have a better idea?= =20 Otherwise, I'd suggest to postpone a change like this after 2.0 is released= =20 and keep it the way it currently is (global macros loaded once at WebMacro= =20 startup). Sebastian =2D-=20 Sebastian Kanthak PGP/GnuPG: http://www.muehlheim.de/~skanthak/pgp.html |