def set(self, key: str, value: V, ttl: Optional[timedelta] = None) -> None: return self.storage.set( wrap_key(self.prefix, self.version, key), value, ttl, )
def get_many(self, keys: Sequence[str]) -> Iterator[Tuple[str, V]]: results = self.storage.get_many( [wrap_key(self.prefix, self.version, key) for key in keys]) for key, value in results: yield unwrap_key(self.prefix, self.version, key), value
def delete_many(self, keys: Sequence[str]) -> None: return self.storage.delete_many( [wrap_key(self.prefix, self.version, key) for key in keys])
def get(self, key: str) -> Optional[V]: return self.storage.get(wrap_key(self.prefix, self.version, key))
def delete(self, key: str) -> None: self.storage.delete(wrap_key(self.prefix, self.version, key))