Module Expr Str Assign NameStore TupleLoad Str ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str Assign NameStore Dict Assign NameStore Dict FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Dict Str Str NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Dict Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad Call NameLoad NameLoad Call NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str If Call NameLoad NameLoad Str NameLoad body Return TryExcept body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Return Assign NameStore BoolOpOr NameLoad SubscriptLoad NameLoad Index Str Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Dict Str Str Str Str NameLoad NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str TryExcept body Assign SubscriptStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Index Str Call AttributeLoad NameLoad attr Return SubscriptLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Index Str handlers ExceptHandler type NameLoad body Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str TryExcept body Return SubscriptLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Index Str handlers ExceptHandler type NameLoad body Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str TryExcept body Return SubscriptLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Index Str handlers ExceptHandler type NameLoad body Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str TryExcept body If CompareIsNot NameLoad NameLoad body Delete SubscriptDel SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad orelse Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Dict handlers ExceptHandler type NameLoad body Pass decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults Num body Print TupleLoad Str NameLoad Import alias Assign NameStore ListLoad For NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad body Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad If CompareEq SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str body Continue Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad SubscriptLoad NameLoad Index Str NameLoad Print TupleLoad Str SubscriptLoad NameLoad Index Str Assign NameStore Num While CompareLt NameLoad NameLoad body TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Print TupleLoad Str NameLoad NameLoad Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Return Delete SubscriptDel SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body If CompareNotIn NameLoad AttributeLoad NameLoad attr body Continue Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Str If BoolOpAnd CompareIsNot NameLoad NameLoad CompareGt NameLoad NameLoad body AugAssignMult NameStore Num Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Str NameLoad Continue For NameStore SubscriptLoad Call NameLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Slice body Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Index Str Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Index Str If CompareIsNot NameLoad NameLoad body Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Continue If CompareGt BinOpSub NameLoad NameLoad NameLoad body Delete SubscriptDel SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad decorator_list NameLoad FunctionDef arguments args defaults body Expr Str Print Str For NameStore AttributeLoad NameLoad attr body Print BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Str Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Str decorator_list NameLoad decorator_list If CompareNotIn Str NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num
N/A N/A 
Cache manager
=============

The cache manager can be used to store python objects attached to a unique
key. The cache can be controlled in two ways: with a object limit or a
timeout.

For example, we can create a new cache with a limit of 10 objects and a
timeout of 5 seconds::

    # register a new Cache
    Cache.register('mycache', limit=10, timeout=5)

    # create an object + id
    key = 'objectid'
    instance = Label(text=text)
    Cache.append('mycache', key, instance)

    # retrieve the cached object
    instance = Cache.get('mycache', key)

If the instance is NULL, the cache may have trashed it because you've
not used the label for 5 seconds and you've reach the limit.
 N/A __all__ N/A Cache os environ kivy.logger Logger kivy.clock Clock Cache N/A object N/A N/A See module documentation for more information.
     N/A _categories N/A N/A _objects N/A register N/A N/A category limit timeout N/A None None N/A N/A Register a new category in the cache with the specified limit.

        :Parameters:
            `category` : str
                Identifier of the category.
            `limit` : int (optional)
                Maximum number of objects allowed in the cache.
                If None, no limit is applied.
            `timeout` : double (optional)
                Time after which to delete the object if it has not been used.
                If None, no timeout is applied.
         N/A N/A N/A Cache _categories N/A category N/A limit timeout limit timeout N/A N/A N/A Cache _objects N/A category N/A N/A N/A N/A Logger debug N/A Cache: register <%s> with limit=%s, timeout=%s N/A category N/A str limit N/A str timeout N/A staticmethod append N/A N/A category key obj timeout N/A None N/A N/A Add a new object to the cache.

        :Parameters:
            `category` : str
                Identifier of the category.
            `key` : str
                Unique identifier of the object to store.
            `obj` : object
                Object to store in cache.
            `timeout` : double (optional)
                Time after which to delete the object if it has not been used.
                If None, no timeout is applied.
         N/A N/A getattr obj _no_cache False N/A N/A N/A N/A N/A cat N/A N/A Cache _categories N/A category N/A N/A N/A KeyError N/A N/A N/A N/A Logger warning N/A Cache: category <%s> not exist category N/A N/A timeout N/A timeout N/A cat N/A timeout N/A N/A N/A N/A Cache _objects N/A category N/A key N/A object timeout lastaccess timestamp obj timeout N/A N/A Clock get_time N/A N/A Clock get_time N/A staticmethod get N/A N/A category key default N/A None N/A N/A Get a object from the cache.

        :Parameters:
            `category` : str
                Identifier of the category.
            `key` : str
                Unique identifier of the object in the store.
            `default` : anything, defaults to None
                Default value to be returned if the key is not found.
         N/A N/A N/A N/A N/A N/A N/A Cache _objects N/A category N/A key N/A lastaccess N/A N/A Clock get_time N/A N/A N/A N/A N/A Cache _objects N/A category N/A key N/A object N/A N/A N/A Exception N/A N/A default N/A staticmethod get_timestamp N/A N/A category key default N/A None N/A N/A Get the object timestamp in the cache.

        :Parameters:
            `category` : str
                Identifier of the category.
            `key` : str
                Unique identifier of the object in the store.
            `default` : anything, defaults to None
                Default value to be returned if the key is not found.
         N/A N/A N/A N/A N/A N/A N/A Cache _objects N/A category N/A key N/A timestamp N/A N/A N/A Exception N/A N/A default N/A staticmethod get_lastaccess N/A N/A category key default N/A None N/A N/A Get the objects last access time in the cache.

        :Parameters:
            `category` : str
                Identifier of the category.
            `key` : str
                Unique identifier of the object in the store.
            `default` : anything, defaults to None
                Default value to be returned if the key is not found.
         N/A N/A N/A N/A N/A N/A N/A Cache _objects N/A category N/A key N/A lastaccess N/A N/A N/A Exception N/A N/A default N/A staticmethod remove N/A N/A category key N/A None N/A N/A Purge the cache.

        :Parameters:
            `category` : str
                Identifier of the category.
            `key` : str (optional)
                Unique identifier of the object in the store. If this
                arguement is not supplied, the entire category will be purged.
         N/A N/A N/A N/A key None N/A N/A N/A N/A N/A Cache _objects N/A category N/A key N/A N/A N/A N/A Cache _objects N/A category N/A N/A N/A N/A Exception N/A N/A N/A staticmethod _purge_oldest N/A N/A category maxpurge N/A 1 N/A N/A N/A PURGE category N/A heapq N/A heap_list N/A N/A key N/A N/A Cache _objects N/A category N/A N/A obj N/A N/A N/A Cache _objects N/A category N/A key N/A N/A N/A obj N/A lastaccess N/A obj N/A timestamp N/A N/A N/A N/A N/A heapq heappush heap_list N/A N/A obj N/A lastaccess key N/A N/A <<< N/A obj N/A lastaccess N/A n 0 N/A N/A n maxpurge N/A N/A N/A N/A N/A lastaccess key N/A N/A heapq heappop heap_list N/A N/A => key lastaccess N/A N/A Clock get_time N/A N/A N/A Exception N/A N/A N/A N/A N/A N/A Cache _objects N/A category N/A key N/A staticmethod _purge_by_timeout N/A N/A dt N/A N/A N/A curtime N/A N/A Clock get_time N/A category N/A Cache _objects N/A N/A N/A category N/A Cache _categories N/A N/A N/A timeout N/A N/A N/A Cache _categories N/A category N/A timeout N/A N/A N/A timeout None N/A dt timeout N/A N/A timeout 2 N/A N/A N/A N/A Cache _categories N/A category N/A timeout timeout N/A N/A key N/A N/A list N/A N/A N/A N/A Cache _objects N/A category keys N/A N/A N/A lastaccess N/A N/A N/A N/A Cache _objects N/A category N/A key N/A lastaccess N/A objtimeout N/A N/A N/A N/A Cache _objects N/A category N/A key N/A timeout N/A N/A objtimeout None N/A N/A timeout objtimeout N/A N/A timeout None N/A N/A N/A N/A N/A curtime lastaccess timeout N/A N/A N/A N/A N/A Cache _objects N/A category N/A key N/A staticmethod print_usage N/A N/A N/A N/A N/A Print the cache usage to the console. N/A Cache usage : N/A category N/A Cache _categories N/A N/A N/A  * %s : %d / %s, timeout=%s N/A N/A N/A category capitalize N/A len N/A N/A Cache _objects N/A category N/A str N/A N/A N/A Cache _categories N/A category N/A limit N/A str N/A N/A N/A Cache _categories N/A category N/A timeout N/A staticmethod N/A N/A N/A KIVY_DOC_INCLUDE environ N/A N/A N/A N/A Clock schedule_interval N/A Cache _purge_by_timeout 1