def start_get_pdu_cache(self): self._get_pdu_cache = ExpiringCache( cache_name="get_pdu_cache", clock=self._clock, max_len=1000, expiry_ms=120*1000, reset_expiry_on_get=False, ) self._get_pdu_cache.start()
def start_caching(self): logger.debug("start_caching") self._state_cache = ExpiringCache( cache_name="state_cache", clock=self.clock, max_len=SIZE_OF_CACHE, expiry_ms=EVICTION_TIMEOUT_SECONDS * 1000, reset_expiry_on_get=True, ) self._state_cache.start()