tensor/utils.py
def expire(self, age):
        """Expire any items in the cache older than `age` seconds"""
        now = time.time()
        cache = self._acquire_cache()
        
        expired = [k for k, v in cache.items() if (now - v[0]) > age]

        for k in expired:
            if k in cache:
                del cache[k]
            if k in self.store:
                del self.store[k]

        self._write_cache(cache)
def expire(self, age):
        now = time.time()
        cache = self._acquire_cache()
        
        expired = [k for k, v in cache.items() if (now - v[0]) > age]

        for k in expired:
            if k in cache:
                del cache[k]
            if k in self.store:
                del self.store[k]

        self._write_cache(cache)
def expire ( self , age ) : now = time . time ( ) cache = self . _acquire_cache ( ) expired = [ k for k , v in cache . items ( ) if ( now - v [ 0 ] ) > age ] for k in expired : if k in cache : del cache [ k ] if k in self . store : del self . store [ k ] self . _write_cache ( cache )
Expire any items in the cache older than `age` seconds
Expire any items in the cache older than age seconds