face-intel / services /cache_service.py
Marwan
Restructure + add reverse face search (PimEyes-style)
f5eeb1c
Raw
History Blame Contribute Delete
484 Bytes
"""Cache service — inspection + invalidation."""
from __future__ import annotations
from storage.cache import Cache
class CacheService:
"""Read-mostly cache facade."""
def __init__(self, cache: Cache) -> None:
self._cache = cache
def stats(self) -> dict:
return self._cache.stats()
def invalidate(self, key: str) -> bool:
return self._cache.invalidate(key)
def clear(self) -> int:
n = self._cache.clear()
return n