Module Expr Str Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias TryExcept body Import alias identifier handlers ExceptHandler type NameLoad body Import alias ImportFrom alias alias alias alias alias ImportFrom alias FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad Str body Return Call NameLoad NameLoad Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults Num body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str Return Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str Return Call NameLoad Call NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad body Assign NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str Return Call NameLoad GeneratorExp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body Expr Str Assign NameStore BinOpAdd BoolOpOr Call AttributeLoad NameLoad attr NameLoad Num NameLoad Return IfExp Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body Expr Str Assign NameStore BinOpSub BoolOpOr Call AttributeLoad NameLoad attr NameLoad Num NameLoad Return IfExp Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults Num Num body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareGt Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Assign NameStore ListLoad For TupleStore NameStore TupleStore NameStore TupleStore NameStore NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr body If BoolOpOr BoolOpAnd CompareNotEq NameLoad Num CompareLtE NameLoad NameLoad CompareEq BinOpMod NameLoad Num Num body Expr Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr If CompareGt NameLoad Num body Assign NameStore BinOpAdd Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body TryExcept body Assign TupleStore NameStore NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If BoolOpOr CompareEq NameLoad Num CompareGt NameLoad Call NameLoad body Return Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type TupleLoad NameLoad AttributeLoad NameLoad attr body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad TupleLoad NameLoad Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore TupleLoad NameLoad Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr If CompareIn NameLoad AttributeLoad NameLoad attr body Return NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return CompareIsNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body TryExcept body Assign TupleStore NameStore NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Return BoolOpOr CompareEq NameLoad Num CompareGt NameLoad Call NameLoad handlers ExceptHandler type NameLoad body Return NameLoad decorator_list decorator_list Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr Str attr ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Num NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If BoolOpOr CompareIs NameLoad NameLoad Call NameLoad NameLoad TupleLoad NameLoad NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore ListLoad Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str orelse Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad Str If AttributeLoad NameLoad attr body Assign NameStore BinOpAdd AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr If CompareGt NameLoad Num body Assign NameStore BinOpAdd Call NameLoad Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call NameLoad NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Assign NameStore Dict Assign NameStore NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore NameLoad If Call NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr If BoolOpOr NameLoad AttributeLoad NameLoad attr body Assign NameStore Dict For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index NameLoad NameLoad If CompareLt Call NameLoad NameLoad Call NameLoad NameLoad body For NameStore NameLoad body If CompareNotIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return ListComp SubscriptLoad NameLoad Index NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign NameStore Dict For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return UnaryOpNot NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call NameLoad NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call NameLoad NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body Import alias handlers ExceptHandler type NameLoad body Pass orelse Return Call AttributeLoad NameLoad attr NameLoad TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body Pass orelse Return Call AttributeLoad NameLoad attr TryExcept body Import alias handlers ExceptHandler type NameLoad body Pass orelse Return Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list Assign NameStore NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str Num NameLoad Num Num NameLoad kwarg body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If Call NameLoad NameLoad NameLoad body TryExcept body Import alias handlers ExceptHandler type NameLoad body Raise Call NameLoad Str If Call AttributeLoad NameLoad attr Str NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad NameLoad orelse Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BoolOpOr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr If CompareEq NameLoad Num body Assign NameStore Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad If CompareIn NameLoad NameLoad body Return Call AttributeLoad Call NameLoad NameLoad attr Str Return BinOpAdd Str Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIs NameLoad NameLoad body Return NameLoad If Call AttributeLoad NameLoad attr Str body TryExcept body Return Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num handlers ExceptHandler type AttributeLoad NameLoad attr body Return NameLoad TryExcept body Return Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body If AttributeLoad NameLoad attr body Assign NameStore ListComp BinOpAdd AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad Return ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad Num body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword BinOpAdd AttributeLoad NameLoad attr NameLoad keyword NameLoad orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword BinOpAdd AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return BoolOpAnd Call AttributeLoad AttributeLoad NameLoad attr attr keyword BinOpAdd AttributeLoad NameLoad attr NameLoad keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword BinOpAdd AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr keyword BinOpAdd AttributeLoad NameLoad attr NameLoad keyword NameLoad orelse Expr Call AttributeLoad NameLoad attr keyword BinOpAdd AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body If UnaryOpNot NameLoad body Return If AttributeLoad NameLoad attr body Assign NameStore ListComp BinOpAdd AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore NameLoad If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad NameLoad attr Str If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body Return Call AttributeLoad AttributeLoad NameLoad attr attr keyword BinOpAdd AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body Return Call AttributeLoad AttributeLoad NameLoad attr attr keyword BinOpAdd AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num Num body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body If CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return ListComp Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad comprehension NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr UnaryOpNot Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr If CompareGt Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad TryExcept body For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore NameLoad With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BoolOpOr BoolOpAnd CompareNotEq NameLoad Num CompareLtE NameLoad NameLoad CompareEq BinOpMod NameLoad Num Num If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad body Pass decorator_list FunctionDef arguments args NameParam defaults body For NameStore Call AttributeLoad NameLoad attr body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad TryExcept body With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpOr CompareEq NameLoad Num CompareGtE NameLoad Call NameLoad body Return Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad AttributeLoad NameLoad attr body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad BinOpAdd Call NameLoad AttributeLoad NameLoad attr orelse If CompareNotEq NameLoad Num body Assign NameStore Call NameLoad BinOpAdd Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr handlers ExceptHandler type TupleLoad NameLoad NameLoad body Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body TryExcept body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad body Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad TryExcept body With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpOr CompareEq NameLoad Num CompareGtE NameLoad Call NameLoad body Return NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad AttributeLoad NameLoad attr body Return NameLoad decorator_list decorator_list
N/A N/A 
    werkzeug.contrib.cache
    ~~~~~~~~~~~~~~~~~~~~~~

    The main problem with dynamic Web sites is, well, they're dynamic.  Each
    time a user requests a page, the webserver executes a lot of code, queries
    the database, renders templates until the visitor gets the page he sees.

    This is a lot more expensive than just loading a file from the file system
    and sending it to the visitor.

    For most Web applications, this overhead isn't a big deal but once it
    becomes, you will be glad to have a cache system in place.

    How Caching Works
    =================

    Caching is pretty simple.  Basically you have a cache object lurking around
    somewhere that is connected to a remote cache or the file system or
    something else.  When the request comes in you check if the current page
    is already in the cache and if so, you're returning it from the cache.
    Otherwise you generate the page and put it into the cache. (Or a fragment
    of the page, you don't have to cache the full thing)

    Here is a simple example of how to cache a sidebar for a template::

        def get_sidebar(user):
            identifier = 'sidebar_for/user%d' % user.id
            value = cache.get(identifier)
            if value is not None:
                return value
            value = generate_sidebar_for(user=user)
            cache.set(identifier, value, timeout=60 * 5)
            return value

    Creating a Cache Object
    =======================

    To create a cache object you just import the cache system of your choice
    from the cache module and instantiate it.  Then you can start working
    with that object:

    >>> from werkzeug.contrib.cache import SimpleCache
    >>> c = SimpleCache()
    >>> c.set("foo", "value")
    >>> c.get("foo")
    'value'
    >>> c.get("missing") is None
    True

    Please keep in mind that you have to create the cache and put it somewhere
    you have access to it (either as a module global you can import or you just
    put it into your WSGI application).

    :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details.
    :license: BSD, see LICENSE for more details.
 N/A os N/A re N/A errno N/A tempfile hashlib md5 time time N/A N/A N/A cPickle pickle N/A N/A N/A ImportError N/A N/A pickle werkzeug._compat iteritems string_types text_type integer_types to_native werkzeug.posixemulation rename _items N/A N/A mappingorseq N/A N/A N/A Wrapper for efficient iteration over mappings represented by dicts
    or sequences::

        >>> for k, v in _items((i, i*i) for i in xrange(5)):
        ...    assert k*k == v

        >>> for k, v in _items(dict((i, i*i) for i in xrange(5))):
        ...    assert k*k == v

     N/A N/A hasattr mappingorseq items N/A N/A N/A iteritems mappingorseq N/A mappingorseq N/A BaseCache N/A object N/A N/A Baseclass for the cache systems.  All the cache systems implement this
    API or a superset of it.

    :param default_timeout: the default timeout (in seconds) that is used if no
                            timeout is specified on :meth:`set`. A timeout of 0
                            indicates that the cache never expires.
     __init__ N/A N/A self default_timeout N/A 300 N/A N/A N/A self default_timeout default_timeout N/A get N/A N/A self key N/A N/A N/A Look up key in the cache and return the value for it.

        :param key: the key to be looked up.
        :returns: The value if it exists and is readable, else ``None``.
         N/A None N/A delete N/A N/A self key N/A N/A N/A Delete `key` from the cache.

        :param key: the key to delete.
        :returns: Whether the key existed and has been deleted.
        :rtype: boolean
         N/A True N/A get_many N/A N/A self N/A keys N/A N/A Returns a list of values for the given keys.
        For each key a item in the list is created::

            foo, bar = cache.get_many("foo", "bar")

        Has the same error handling as :meth:`get`.

        :param keys: The function accepts multiple keys as positional
                     arguments.
         N/A N/A map N/A self get keys N/A get_dict N/A N/A self N/A keys N/A N/A Like :meth:`get_many` but return a dict::

            d = cache.get_dict("foo", "bar")
            foo = d["foo"]
            bar = d["bar"]

        :param keys: The function accepts multiple keys as positional
                     arguments.
         N/A N/A dict N/A zip keys N/A N/A self get_many keys N/A set N/A N/A self key value timeout N/A None N/A N/A Add a new key/value to the cache (overwrites value, if key already
        exists in the cache).

        :param key: the key to set
        :param value: the value for the key
        :param timeout: the cache timeout for the key (if not specified,
                        it uses the default timeout). A timeout of 0 idicates
                        that the cache never expires.
        :returns: ``True`` if key has been updated, ``False`` for backend
                  errors. Pickling errors, however, will raise a subclass of
                  ``pickle.PickleError``.
        :rtype: boolean
         N/A True N/A add N/A N/A self key value timeout N/A None N/A N/A Works like :meth:`set` but does not overwrite the values of already
        existing keys.

        :param key: the key to set
        :param value: the value for the key
        :param timeout: the cache timeout for the key or the default
                        timeout if not specified. A timeout of 0 indicates
                        that the cache never expires.
        :returns: Same as :meth:`set`, but also ``False`` for already
                  existing keys.
        :rtype: boolean
         N/A True N/A set_many N/A N/A self mapping timeout N/A None N/A N/A Sets multiple keys and values from a mapping.

        :param mapping: a mapping with the keys/values to set.
        :param timeout: the cache timeout for the key (if not specified,
                        it uses the default timeout). A timeout of 0
                        indicates tht the cache never expires.
        :returns: Whether all given keys have been set.
        :rtype: boolean
         N/A rv True N/A N/A key value N/A _items mapping N/A N/A N/A N/A N/A self set key value timeout N/A N/A rv False N/A rv N/A delete_many N/A N/A self N/A keys N/A N/A Deletes multiple keys at once.

        :param keys: The function accepts multiple keys as positional
                     arguments.
        :returns: Whether all given keys have been deleted.
        :rtype: boolean
         N/A N/A all N/A N/A N/A self delete key N/A key keys N/A has N/A N/A self key N/A N/A N/A Checks if a key exists in the cache without returning it. This is a
        cheap operation that bypasses loading the actual data on the backend.

        This method is optional and may not be implemented on all caches.

        :param key: the key to check
         N/A N/A NotImplementedError %s doesn't have an efficient implementation of `has`. That means it is impossible to check whether a key exists without fully loading the key's data. Consider using `self.get` explicitly if you don't care about performance. N/A clear N/A N/A self N/A N/A N/A Clears the cache.  Keep in mind that not all caches support
        completely clearing the cache.
        :returns: Whether the cache has been cleared.
        :rtype: boolean
         N/A True N/A inc N/A N/A self key delta N/A 1 N/A N/A Increments the value of a key by `delta`.  If the key does
        not yet exist it is initialized with `delta`.

        For supporting caches this is an atomic operation.

        :param key: the key to increment.
        :param delta: the delta to add.
        :returns: The new value or ``None`` for backend errors.
         N/A value N/A N/A N/A N/A self get key 0 delta N/A N/A N/A N/A self set key value value None N/A dec N/A N/A self key delta N/A 1 N/A N/A Decrements the value of a key by `delta`.  If the key does
        not yet exist it is initialized with `-delta`.

        For supporting caches this is an atomic operation.

        :param key: the key to increment.
        :param delta: the delta to subtract.
        :returns: The new value or `None` for backend errors.
         N/A value N/A N/A N/A N/A self get key 0 delta N/A N/A N/A N/A self set key value value None N/A N/A NullCache N/A BaseCache N/A N/A A cache that doesn't cache.  This can be useful for unit testing.

    :param default_timeout: a dummy parameter that is ignored but exists
                            for API compatibility with other caches.
     N/A SimpleCache N/A BaseCache N/A N/A Simple memory cache for single process environments.  This class exists
    mainly for the development server and is not 100% thread safe.  It tries
    to use as many atomic operations as possible and no locks for simplicity
    but it could happen under heavy load that keys are added multiple times.

    :param threshold: the maximum number of items the cache stores before
                      it starts deleting some.
    :param default_timeout: the default timeout that is used if no timeout is
                            specified on :meth:`~BaseCache.set`. A timeout of
                            0 indicates that the cache never expires.
     __init__ N/A N/A self threshold default_timeout N/A 500 300 N/A N/A N/A N/A BaseCache __init__ self default_timeout N/A N/A self _cache N/A N/A N/A self clear N/A N/A self _cache clear N/A N/A self _threshold threshold N/A _prune N/A N/A self N/A N/A N/A N/A N/A len N/A self _cache N/A self _threshold N/A N/A now N/A time N/A toremove N/A N/A N/A idx N/A key N/A expires _ N/A enumerate N/A N/A N/A self _cache items N/A N/A N/A N/A N/A expires 0 N/A expires now N/A N/A idx 3 0 N/A N/A N/A N/A toremove append key N/A key toremove N/A N/A N/A N/A N/A self _cache pop key None N/A _get_expiration N/A N/A self timeout N/A N/A N/A N/A timeout None N/A N/A timeout N/A self default_timeout N/A N/A timeout 0 N/A N/A timeout N/A N/A time timeout N/A timeout N/A get N/A N/A self key N/A N/A N/A N/A N/A N/A expires value N/A N/A self _cache N/A key N/A N/A N/A expires 0 N/A expires N/A time N/A N/A N/A N/A pickle loads value N/A N/A N/A N/A KeyError N/A pickle PickleError N/A N/A None N/A set N/A N/A self key value timeout N/A None N/A N/A expires N/A N/A self _get_expiration timeout N/A N/A N/A self _prune N/A N/A N/A self _cache N/A key N/A expires N/A N/A pickle dumps value N/A pickle HIGHEST_PROTOCOL N/A True N/A add N/A N/A self key value timeout N/A None N/A N/A expires N/A N/A self _get_expiration timeout N/A N/A N/A self _prune N/A item N/A expires N/A N/A pickle dumps value N/A pickle HIGHEST_PROTOCOL N/A N/A key N/A self _cache N/A N/A False N/A N/A N/A N/A self _cache setdefault key item N/A True N/A delete N/A N/A self key N/A N/A N/A N/A N/A N/A N/A self _cache pop key None None N/A has N/A N/A self key N/A N/A N/A N/A N/A N/A expires value N/A N/A self _cache N/A key N/A N/A N/A expires 0 N/A expires N/A time N/A N/A N/A KeyError N/A N/A False N/A N/A N/A _test_memcached_key N/A N/A N/A re compile [^\x00-\x21\xff]{1,250}$ match MemcachedCache N/A BaseCache N/A N/A A cache that uses memcached as backend.

    The first argument can either be an object that resembles the API of a
    :class:`memcache.Client` or a tuple/list of server addresses. In the
    event that a tuple/list is passed, Werkzeug tries to import the best
    available memcache library.

    This cache looks into the following packages/modules to find bindings for
    memcached:

        - ``pylibmc``
        - ``google.appengine.api.memcached``
        - ``memcached``

    Implementation notes:  This cache backend works around some limitations in
    memcached to simplify the interface.  For example unicode keys are encoded
    to utf-8 on the fly.  Methods such as :meth:`~BaseCache.get_dict` return
    the keys in the same format as passed.  Furthermore all get methods
    silently ignore key errors to not cause problems when untrusted user data
    is passed to the get methods which is often the case in web applications.

    :param servers: a list or tuple of server addresses or alternatively
                    a :class:`memcache.Client` or a compatible client.
    :param default_timeout: the default timeout that is used if no timeout is
                            specified on :meth:`~BaseCache.set`. A timeout of
                            0 indicates taht the cache never expires.
    :param key_prefix: a prefix that is added before all keys.  This makes it
                       possible to use the same memcached server for different
                       applications.  Keep in mind that
                       :meth:`~BaseCache.clear` will also clear keys with a
                       different prefix.
     __init__ N/A N/A self servers default_timeout key_prefix N/A None 300 None N/A N/A N/A N/A BaseCache __init__ self default_timeout N/A N/A N/A servers None N/A isinstance servers N/A list tuple N/A N/A N/A servers None N/A N/A servers N/A 127.0.0.1:11211 N/A N/A self _client N/A N/A self import_preferred_memcache_lib servers N/A N/A N/A self _client None N/A N/A N/A RuntimeError no memcache module found N/A N/A N/A self _client servers N/A N/A self key_prefix N/A to_native key_prefix N/A _normalize_key N/A N/A self key N/A N/A N/A key N/A to_native key utf-8 N/A N/A self key_prefix N/A N/A key N/A N/A self key_prefix key N/A key N/A _normalize_timeout N/A N/A self timeout N/A N/A N/A N/A timeout None N/A N/A timeout N/A self default_timeout N/A N/A timeout 0 N/A N/A timeout N/A N/A int N/A time timeout N/A timeout N/A get N/A N/A self key N/A N/A N/A key N/A N/A self _normalize_key key N/A N/A _test_memcached_key key N/A N/A N/A N/A N/A self _client get key N/A get_dict N/A N/A self N/A keys N/A N/A key_mapping N/A N/A have_encoded_keys False N/A key keys N/A N/A encoded_key N/A N/A self _normalize_key key N/A N/A N/A isinstance key str N/A N/A have_encoded_keys True N/A N/A _test_memcached_key key N/A N/A N/A key_mapping N/A encoded_key key N/A d rv N/A N/A N/A self _client get_multi N/A N/A key_mapping keys N/A N/A have_encoded_keys N/A self key_prefix N/A N/A rv N/A N/A N/A key value N/A iteritems d N/A N/A N/A rv N/A N/A key_mapping N/A key value N/A N/A N/A len rv N/A len keys N/A N/A key keys N/A N/A N/A key rv N/A N/A N/A rv N/A key None N/A rv N/A add N/A N/A self key value timeout N/A None N/A N/A key N/A N/A self _normalize_key key N/A timeout N/A N/A self _normalize_timeout timeout N/A N/A N/A N/A self _client add key value timeout N/A set N/A N/A self key value timeout N/A None N/A N/A key N/A N/A self _normalize_key key N/A timeout N/A N/A self _normalize_timeout timeout N/A N/A N/A N/A self _client set key value timeout N/A get_many N/A N/A self N/A keys N/A N/A d N/A N/A self get_dict keys N/A N/A N/A d N/A key N/A key keys N/A set_many N/A N/A self mapping timeout N/A None N/A N/A new_mapping N/A N/A N/A key value N/A _items mapping N/A N/A key N/A N/A self _normalize_key key N/A N/A new_mapping N/A key value N/A timeout N/A N/A self _normalize_timeout timeout N/A failed_keys N/A N/A N/A self _client set_multi new_mapping timeout N/A N/A failed_keys N/A delete N/A N/A self key N/A N/A N/A key N/A N/A self _normalize_key key N/A N/A _test_memcached_key key N/A N/A N/A N/A N/A self _client delete key N/A delete_many N/A N/A self N/A keys N/A N/A new_keys N/A N/A key keys N/A N/A key N/A N/A self _normalize_key key N/A N/A _test_memcached_key key N/A N/A N/A N/A new_keys append key N/A N/A N/A N/A self _client delete_multi new_keys N/A has N/A N/A self key N/A N/A N/A key N/A N/A self _normalize_key key N/A N/A _test_memcached_key key N/A N/A N/A N/A N/A self _client append key N/A False N/A clear N/A N/A self N/A N/A N/A N/A N/A N/A self _client flush_all N/A inc N/A N/A self key delta N/A 1 N/A N/A key N/A N/A self _normalize_key key N/A N/A N/A N/A self _client incr key delta N/A dec N/A N/A self key delta N/A 1 N/A N/A key N/A N/A self _normalize_key key N/A N/A N/A N/A self _client decr key delta N/A import_preferred_memcache_lib N/A N/A self servers N/A N/A N/A Returns an initialized memcache client.  Used by the constructor. N/A N/A N/A pylibmc N/A N/A N/A ImportError N/A N/A N/A N/A N/A N/A pylibmc Client servers N/A N/A google.appengine.api memcache N/A N/A N/A ImportError N/A N/A N/A N/A N/A N/A memcache Client N/A N/A N/A memcache N/A N/A N/A ImportError N/A N/A N/A N/A N/A N/A memcache Client servers N/A N/A N/A GAEMemcachedCache MemcachedCache RedisCache N/A BaseCache N/A N/A Uses the Redis key-value store as a cache backend.

    The first argument can be either a string denoting address of the Redis
    server or an object resembling an instance of a redis.Redis class.

    Note: Python Redis API already takes care of encoding unicode strings on
    the fly.

    .. versionadded:: 0.7

    .. versionadded:: 0.8
       `key_prefix` was added.

    .. versionchanged:: 0.8
       This cache backend now properly serializes objects.

    .. versionchanged:: 0.8.3
       This cache backend now supports password authentication.

    .. versionchanged:: 0.10
        ``**kwargs`` is now passed to the redis object.

    :param host: address of the Redis server or an object which API is
                 compatible with the official Python Redis client (redis-py).
    :param port: port number on which Redis server listens for connections.
    :param password: password authentication for the Redis server.
    :param db: db (zero-based numeric index) on Redis Server to connect.
    :param default_timeout: the default timeout that is used if no timeout is
                            specified on :meth:`~BaseCache.set`. A timeout of
                            0 indicates that the cache never expires.
    :param key_prefix: A prefix that should be added to all keys.

    Any additional keyword arguments will be passed to ``redis.Redis``.
     __init__ N/A N/A self host port password db default_timeout key_prefix N/A localhost 6379 None 0 300 None kwargs N/A N/A N/A N/A BaseCache __init__ self default_timeout N/A N/A isinstance host string_types N/A N/A N/A N/A redis N/A N/A N/A ImportError N/A N/A N/A RuntimeError no redis module found N/A N/A N/A kwargs get decode_responses None N/A N/A N/A ValueError decode_responses is not supported by RedisCache. N/A N/A self _client N/A N/A redis Redis host host port port password password db db kwargs N/A N/A N/A self _client host N/A N/A self key_prefix N/A key_prefix N/A _get_expiration N/A N/A self timeout N/A N/A N/A N/A timeout None N/A N/A timeout N/A self default_timeout N/A N/A timeout 0 N/A N/A timeout -1 N/A timeout N/A dump_object N/A N/A self value N/A N/A N/A Dumps an object into a string for redis.  By default it serializes
        integers as regular string and pickle dumps everything else.
         N/A t N/A type value N/A N/A t integer_types N/A N/A N/A N/A N/A str value encode ascii N/A N/A ! N/A N/A pickle dumps value N/A load_object N/A N/A self value N/A N/A N/A The reversal of :meth:`dump_object`.  This might be called with
        None.
         N/A N/A value None N/A N/A None N/A N/A N/A value startswith ! N/A N/A N/A N/A N/A N/A pickle loads N/A value N/A 1 N/A N/A N/A N/A pickle PickleError N/A N/A None N/A N/A N/A N/A int value N/A N/A N/A ValueError N/A N/A value N/A get N/A N/A self key N/A N/A N/A N/A N/A self load_object N/A N/A N/A self _client get N/A N/A self key_prefix key N/A get_many N/A N/A self N/A keys N/A N/A N/A self key_prefix N/A N/A keys N/A N/A N/A self key_prefix key N/A key keys N/A N/A N/A N/A self load_object x N/A x N/A N/A N/A self _client mget keys N/A set N/A N/A self key value timeout N/A None N/A N/A timeout N/A N/A self _get_expiration timeout N/A dump N/A N/A self dump_object value N/A N/A timeout -1 N/A N/A result N/A N/A N/A self _client set name N/A N/A self key_prefix key value dump N/A N/A result N/A N/A N/A self _client setex name N/A N/A self key_prefix key value dump time timeout N/A result N/A add N/A N/A self key value timeout N/A None N/A N/A timeout N/A N/A self _get_expiration timeout N/A dump N/A N/A self dump_object value N/A N/A N/A N/A N/A self _client setnx name N/A N/A self key_prefix key value dump N/A N/A N/A self _client expire name N/A N/A self key_prefix key time timeout N/A set_many N/A N/A self mapping timeout N/A None N/A N/A timeout N/A N/A self _get_expiration timeout N/A pipe N/A N/A N/A self _client pipeline transaction False N/A N/A key value N/A _items mapping N/A N/A dump N/A N/A self dump_object value N/A N/A timeout -1 N/A N/A N/A N/A pipe set name N/A N/A self key_prefix key value dump N/A N/A N/A N/A pipe setex name N/A N/A self key_prefix key value dump time timeout N/A N/A N/A pipe execute N/A delete N/A N/A self key N/A N/A N/A N/A N/A N/A self _client delete N/A N/A self key_prefix key N/A delete_many N/A N/A self N/A keys N/A N/A N/A keys N/A N/A N/A N/A self key_prefix N/A N/A keys N/A N/A N/A self key_prefix key N/A key keys N/A N/A N/A N/A self _client delete keys N/A has N/A N/A self key N/A N/A N/A N/A N/A N/A self _client exists N/A N/A self key_prefix key N/A clear N/A N/A self N/A N/A N/A status False N/A N/A self key_prefix N/A N/A keys N/A N/A N/A self _client keys N/A N/A self key_prefix * N/A keys N/A N/A status N/A N/A N/A self _client delete keys N/A N/A status N/A N/A N/A self _client flushdb N/A status N/A inc N/A N/A self key delta N/A 1 N/A N/A N/A N/A N/A self _client incr name N/A N/A self key_prefix key amount delta N/A dec N/A N/A self key delta N/A 1 N/A N/A N/A N/A N/A self _client decr name N/A N/A self key_prefix key amount delta N/A N/A FileSystemCache N/A BaseCache N/A N/A A cache that stores the items on the file system.  This cache depends
    on being the only user of the `cache_dir`.  Make absolutely sure that
    nobody but this cache stores files there or otherwise the cache will
    randomly delete files therein.

    :param cache_dir: the directory where cache files are stored.
    :param threshold: the maximum number of items the cache stores before
                      it starts deleting some.
    :param default_timeout: the default timeout that is used if no timeout is
                            specified on :meth:`~BaseCache.set`. A timeout of
                            0 indicates that the cache never expires.
    :param mode: the file mode wanted for the cache files, default 0600
     N/A _fs_transaction_suffix .__wz_cache __init__ N/A N/A self cache_dir threshold default_timeout mode N/A 500 300 384 N/A N/A N/A N/A BaseCache __init__ self default_timeout N/A N/A self _path cache_dir N/A N/A self _threshold threshold N/A N/A self _mode mode N/A N/A N/A N/A N/A os makedirs N/A self _path N/A N/A N/A OSError N/A ex N/A N/A N/A N/A ex errno N/A errno EEXIST N/A N/A N/A _list_dir N/A N/A self N/A N/A N/A return a list of (fully qualified) cache filenames
         N/A N/A N/A N/A N/A os path join N/A self _path fn N/A fn N/A N/A os listdir N/A self _path N/A N/A N/A fn endswith N/A self _fs_transaction_suffix N/A _prune N/A N/A self N/A N/A N/A entries N/A N/A self _list_dir N/A N/A N/A len entries N/A self _threshold N/A N/A now N/A time N/A N/A N/A N/A idx fname N/A enumerate entries N/A N/A remove False N/A N/A open fname rb f N/A N/A expires N/A N/A pickle load f N/A remove N/A N/A N/A expires 0 N/A expires now N/A N/A idx 3 0 N/A remove N/A N/A N/A N/A os remove fname N/A N/A N/A N/A IOError OSError N/A N/A N/A clear N/A N/A self N/A N/A N/A fname N/A N/A self _list_dir N/A N/A N/A N/A N/A N/A os remove fname N/A N/A N/A N/A IOError OSError N/A N/A False N/A True N/A _get_filename N/A N/A self key N/A N/A N/A N/A isinstance key text_type N/A N/A key N/A N/A key encode utf-8 N/A hash N/A N/A N/A md5 key hexdigest N/A N/A N/A N/A os path join N/A self _path hash N/A get N/A N/A self key N/A N/A N/A filename N/A N/A self _get_filename key N/A N/A N/A N/A open filename rb f N/A N/A pickle_time N/A N/A pickle load f N/A N/A N/A pickle_time 0 N/A pickle_time N/A time N/A N/A N/A N/A pickle load f N/A N/A N/A N/A os remove filename N/A None N/A N/A N/A N/A IOError OSError N/A pickle PickleError N/A N/A None N/A add N/A N/A self key value timeout N/A None N/A N/A filename N/A N/A self _get_filename key N/A N/A N/A N/A N/A os path exists filename N/A N/A N/A N/A self set key value timeout N/A False N/A set N/A N/A self key value timeout N/A None N/A N/A N/A timeout None N/A N/A timeout N/A int N/A N/A time N/A self default_timeout N/A N/A N/A timeout 0 N/A N/A timeout N/A int N/A N/A time timeout N/A filename N/A N/A self _get_filename key N/A N/A N/A self _prune N/A N/A N/A N/A fd tmp N/A N/A tempfile mkstemp suffix N/A self _fs_transaction_suffix dir N/A self _path N/A N/A N/A os fdopen fd wb f N/A N/A N/A N/A pickle dump timeout f 1 N/A N/A N/A pickle dump value f N/A pickle HIGHEST_PROTOCOL N/A N/A rename tmp filename N/A N/A N/A os chmod filename N/A self _mode N/A N/A N/A N/A IOError OSError N/A N/A False N/A N/A True N/A delete N/A N/A self key N/A N/A N/A N/A N/A N/A N/A os remove N/A N/A self _get_filename key N/A N/A N/A N/A IOError OSError N/A N/A False N/A N/A True N/A has N/A N/A self key N/A N/A N/A filename N/A N/A self _get_filename key N/A N/A N/A N/A open filename rb f N/A N/A pickle_time N/A N/A pickle load f N/A N/A N/A pickle_time 0 N/A pickle_time N/A time N/A N/A True N/A N/A N/A N/A os remove filename N/A False N/A N/A N/A N/A IOError OSError N/A pickle PickleError N/A N/A False N/A N/A