From 7f156aec692ed98b06d129e3d3649e1434f9c8fd Mon Sep 17 00:00:00 2001 From: SimFG Date: Mon, 31 Jul 2023 19:43:24 +0800 Subject: [PATCH] Fix the error: 'SSDataManager' object has no attribute 'eviction_manager' (#501) Signed-off-by: SimFG --- gptcache/manager/data_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gptcache/manager/data_manager.py b/gptcache/manager/data_manager.py index a30ce010..46bfb3d2 100644 --- a/gptcache/manager/data_manager.py +++ b/gptcache/manager/data_manager.py @@ -235,6 +235,7 @@ def __init__( self.s = s self.v = v self.o = o + self.eviction_manager = EvictionManager(self.s, self.v) self.eviction_base = EvictionBase( name="memory", policy=policy, @@ -243,7 +244,6 @@ def __init__( on_evict=self._clear, ) self.eviction_base.put(self.s.get_ids(deleted=False)) - self.eviction_manager = EvictionManager(self.s, self.v) def _clear(self, marked_keys): self.eviction_manager.soft_evict(marked_keys)