Module Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias TryExcept body Import alias identifier handlers ExceptHandler type NameLoad body Import alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias identifier ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Str Num NameLoad Num NameLoad 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 Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad orelse Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BoolOpOr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad If BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Return Call NameLoad NameLoad 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 Return Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num 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 If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad NameLoad attr NameLoad NameLoad If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr 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 Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad NameLoad attr Str If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body Return Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body Return Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list
N/A N/A os N/A re N/A tempfile time time basecache BaseCache posixemulation rename _items N/A N/A N/A cPickle pickle N/A N/A N/A ImportError N/A N/A pickle N/A N/A hashlib md5 N/A N/A N/A ImportError N/A md5 new md5 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.

    :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 default_timeout: the default timeout that is used if no timeout is
                            specified on :meth:`~BaseCache.set`.
    :param key_prefix: A prefix that should be added to all keys.
     __init__ N/A N/A self host port password default_timeout key_prefix N/A localhost 6379 None 300 None N/A N/A N/A N/A BaseCache __init__ self default_timeout N/A N/A isinstance host basestring 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 self _client N/A N/A redis Redis host host port port password password N/A N/A N/A self _client host N/A N/A self key_prefix N/A key_prefix 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 N/A t int N/A t long N/A N/A N/A str value 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 callde 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 pickle loads N/A value N/A 1 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 N/A timeout None N/A N/A timeout N/A self default_timeout N/A dump N/A N/A self dump_object value N/A N/A N/A N/A self _client setex N/A N/A self key_prefix key dump timeout N/A add 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 self default_timeout N/A dump N/A N/A self dump_object value N/A added N/A N/A N/A self _client setnx N/A N/A self key_prefix key dump N/A added N/A N/A N/A N/A N/A self _client expire N/A N/A self key_prefix key timeout N/A set_many N/A N/A self mapping timeout N/A None N/A N/A N/A timeout None N/A N/A timeout N/A self default_timeout N/A pipe N/A N/A N/A self _client pipeline 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 N/A pipe setex N/A N/A self key_prefix key dump 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 clear N/A N/A self N/A N/A 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 N/A N/A N/A self _client delete keys N/A N/A N/A N/A N/A self _client flushdb 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 N/A N/A self key_prefix key 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 N/A N/A self key_prefix key delta N/A N/A