Пример #1
0
 def reset_caches():
     for name, chain in cache_chains.iteritems():
         chain.reset()
         if isinstance(chain, StaleCacheChain):
             chain.stats = StaleCacheStats(self.stats, name)
         else:
             chain.stats = CacheStats(self.stats, name)
Пример #2
0
        def reset_caches():
            for name, chain in cache_chains.iteritems():
                if isinstance(chain, TransitionalCache):
                    chain = chain.read_chain

                chain.reset()
                if isinstance(chain, LocalCache):
                    continue
                elif isinstance(chain, StaleCacheChain):
                    chain.stats = StaleCacheStats(self.stats, name)
                else:
                    chain.stats = CacheStats(self.stats, name)