Remove unused MOdelCache.exists(...) function.

This commit is contained in:
Ryan Dick 2024-08-27 14:43:41 +00:00
parent 5fefb3b0f4
commit cad9a41433
2 changed files with 0 additions and 18 deletions

View File

@ -193,15 +193,6 @@ class ModelCacheBase(ABC, Generic[T]):
""" """
pass pass
@abstractmethod
def exists(
self,
key: str,
submodel_type: Optional[SubModelType] = None,
) -> bool:
"""Return true if the model identified by key and submodel_type is in the cache."""
pass
@abstractmethod @abstractmethod
def cache_size(self) -> int: def cache_size(self) -> int:
"""Get the total size of the models currently cached.""" """Get the total size of the models currently cached."""

View File

@ -130,15 +130,6 @@ class ModelCache(ModelCacheBase[AnyModel]):
total += cache_record.size total += cache_record.size
return total return total
def exists(
self,
key: str,
submodel_type: Optional[SubModelType] = None,
) -> bool:
"""Return true if the model identified by key and submodel_type is in the cache."""
key = self._make_cache_key(key, submodel_type)
return key in self._cached_models
def put( def put(
self, self,
key: str, key: str,