MCPcopy
hub / github.com/redis/redis-py / evict_next

Method evict_next

redis/cache.py:321–324  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

319 return EvictionPolicyType.time_based
320
321 def evict_next(self) -> CacheKey:
322 self._assert_cache()
323 popped_entry = self._cache.collection.popitem(last=False)
324 return popped_entry[0]
325
326 def evict_many(self, count: int) -> List[CacheKey]:
327 self._assert_cache()

Callers 3

test_evict_nextMethod · 0.45
setMethod · 0.45

Calls 1

_assert_cacheMethod · 0.95

Tested by 2

test_evict_nextMethod · 0.36