Source code for gptcache.manager.object_data.base
from abc import ABC, abstractmethod
from typing import Any, List
[docs]class ObjectBase(ABC):
"""
Object storage base.
"""
[docs] @abstractmethod
def put(self, obj: Any) -> str:
pass
[docs] @abstractmethod
def get(self, obj: str) -> Any:
pass
[docs] @abstractmethod
def get_access_link(self, obj: str) -> str:
pass
[docs] @abstractmethod
def delete(self, to_delete: List[str]):
pass