Jinja template bytecode cache

101 views
Skip to first unread message

Carlos Daniel Ruvalcaba Valenzuela

unread,
Jul 21, 2012, 1:04:24 PM7/21/12
to turbogea...@googlegroups.com
Hello list,

I have been out of the loop for a while, but now that things are less
busy I'm getting excited with how tg 2.2 is shaping up, congrats to
Michael and Alessandro!

I have been meaning for a while to inquire on template caching, it
seems to me that Genshi does its own caching without much fuss (there
is even docs on Genshi caching), the Mako setup code seems to setup
template compiling too, but as far as Jinja code is concerned there is
no substantial caching (of what is possible), I have explored the
jinja bytecode caching and seems to give good results without altering
the development workflow (template file changes invalidates cache
fine), here are my benchmark results:

http://blog.blackchairsoft.com/2012/07/21/jinja2-bytecode-cache/

My question is if it would be ok for the bytecode cache loader to
piggyback on the build-in turbogears caching mechanisms (beaker
cache)? So far jinja includes a filesystem cache and a light memcache
loader, but we could easily rely on baker interfaces to do the work,
but that would imply the need to add the tg.cache object import on
app_config.py

Comments, ideas?
Regards,
Carlos Daniel Ruvalcaba Valenzuela
Reply all
Reply to author
Forward
0 new messages