jinja2.environment.LRUCache

class jinja2.environment.LRUCache(capacity)[source]

A simple LRU Cache implementation.

Methods

__init__(capacity)
clear() Clear the cache.
copy() Return a shallow copy of the instance.
get(key[, default]) Return an item from the cache dict or default
items() Return a list of items.
iteritems() Iterate over all items.
iterkeys() Iterate over all keys in the cache dict, ordered by the most recent usage.
itervalue() Iterate over all values.
keys() Return a list of all keys ordered by most recent usage.
setdefault(key[, default]) Set default if the key is not in the cache otherwise leave unchanged.
values() Return a list of all values.