jinja2.bccache

This module implements the bytecode cache system Jinja is optionally using. This is useful if you have very complex template situations and the compiliation of all those templates slow down your application too much.

Situations where this is useful are often forking web applications that are initialized on the first request.

copyright:
  1. 2010 by the Jinja Team.
license:

BSD.

Functions

BytesIO StringIO([s]) – Return a StringIO-like stream for reading or writing
listdir((path) -> list_of_strings) Return a list containing the names of the entries in the directory.
marshal_dump(code, f)
marshal_load(f)
open_if_exists(filename[, mode]) Returns a file descriptor for the filename if that file exists, otherwise None.
sha1 Returns a sha1 hash object; optionally initialized with a string

Classes

Bucket(environment, key, checksum) Buckets are used to store the bytecode for one template.
BytecodeCache To implement your own bytecode cache you have to subclass this class and override load_bytecode() and dump_bytecode().
FileSystemBytecodeCache([directory, pattern]) A bytecode cache that stores bytecode on the filesystem.
MemcachedBytecodeCache(client[, prefix, ...]) This class implements a bytecode cache that uses a memcache cache for storing the information.
text_type alias of unicode