On Sun, Jun 21, 2009 at 1:48 AM, Robin B wrote:
> What about using memcache with the app version environment variable in
> the key?  Or is that what you meant by "bytecode cache can't
> be used in App Engine"?

Hi, Robin.
I referred to Jinja2 bytecode cache [1]. Bytecode can't be used in App
Engine. We can memcache the raw Python code (as a string), but not the
compiled Python code object, because marshal is unavailable.

A more automatic solution would store/load the raw Python code from
memcache and compile() it. Even then, we need to override
BaseLoader.load() to get the raw code, and not the code object.

Still, simply loading the precompiled code from disk avoids
unnecessary hits and checkings, and it is easy enough to automatize it
by precompiling the templates in a deployment script.

regards,
-- rodrigo

[1] http://jinja.pocoo.org/2/documentation/api#bytecode-cache

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pocoo-libs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pocoo-libs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to