(self, key: Hashable)
| 27 | self._lock = Lock() |
| 28 | |
| 29 | def get(self, key: Hashable) -> List[Any]: |
| 30 | with self.lock(): |
| 31 | if key in self.fixed_cache: |
| 32 | l = self.fixed_cache[key] |
| 33 | if len(l) >= self.list_size: |
| 34 | return l |
| 35 | elif key in self.cache: |
| 36 | self.cache.move_to_end(key) |
| 37 | l = self.cache[key] |
| 38 | if len(l) >= self.list_size: |
| 39 | return l |
| 40 | raise MissCacheError() |
| 41 | |
| 42 | def add(self, key: Hashable, value: Any) -> None: |
| 43 | with self.lock(): |
no test coverage detected