{ Let me first welcome all of you, this is my first post to this
mailgroup }
And to you!
Idea/question 1: is it possible to load all the templates to the parent apache process so the cache is kept in the shareable memory reused between processes?
Sure, just load them in startup.pl. I have to say though, I tried this, and it really didn't help reduce memory at all. YMMV.
- what should I call to preload some template and all its parts (apply would work but does there exist anything cheaper?)
Check the mailing list archives. There were some recipes for this in there.
- what should I overload to disable TemplateToolkit internal bookkepings (storing last access time, overwritting LRU lists etc which ruin the memory shareability)
Hmmm, good idea. That might help. I think that was in Template::Provider. You could also get it to skip doing file stats to check for changes.
Another thing you might try, if RAM is your primary conern, is just turning off the in-memory cache. This would save a lot of RAM, and would still be pretty fast if the compiled templates are saved to disk.
Idea/question 2: is it possible to implement some kind of shared memory cache instead of in-process cache?
Not a useful one. Perl data structures can't be put in shared memory without serializing them, at which point you might as well just be loading the compiled templates from disk.
- Perrin
_______________________________________________ templates mailing list [EMAIL PROTECTED] http://lists.template-toolkit.org/mailman/listinfo/templates
