@staticmethod
    def append(category, key, obj, timeout=None):
        '''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.
        '''
        #check whether obj should not be cached first
        if getattr(obj, '_no_cache', False):
            return
        try:
            cat = Cache._categories[category]
        except __HOLE__:
            Logger.warning('Cache: category <%s> not exist' % category)
            return
        timeout = timeout or cat['timeout']
        # FIXME: activate purge when limit is hit
        #limit = cat['limit']
        #if limit is not None and len(Cache._objects[category]) >= limit:
        #    Cache._purge_oldest(category)
        Cache._objects[category][key] = {
            'object': obj,
            'timeout': timeout,
            'lastaccess': Clock.get_time(),
            'timestamp': Clock.get_time()}
dataset/ETHPy150Open kivy/kivy/kivy/cache.py/Cache.append