From f4c2365c23dde7e85947c85fc1e9413a5556973b Mon Sep 17 00:00:00 2001 From: hajdul88 <52442977+hajdul88@users.noreply.github.com> Date: Thu, 15 Jan 2026 11:48:10 +0100 Subject: [PATCH] Adds default methods to satisfy base class (FSCache does not support the logging for now) --- .../databases/cache/fscache/FsCacheAdapter.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/cognee/infrastructure/databases/cache/fscache/FsCacheAdapter.py b/cognee/infrastructure/databases/cache/fscache/FsCacheAdapter.py index 497e6afec..6cedcdc8f 100644 --- a/cognee/infrastructure/databases/cache/fscache/FsCacheAdapter.py +++ b/cognee/infrastructure/databases/cache/fscache/FsCacheAdapter.py @@ -89,6 +89,27 @@ class FSCacheAdapter(CacheDBInterface): return None return json.loads(value) + async def log_usage( + self, + user_id: str, + log_entry: dict, + ttl: int | None = 604800, + ): + """ + Usage logging is not supported in filesystem cache backend. + This method is a no-op to satisfy the interface. + """ + logger.warning("Usage logging not supported in FSCacheAdapter, skipping") + pass + + async def get_usage_logs(self, user_id: str, limit: int = 100): + """ + Usage logging is not supported in filesystem cache backend. + This method returns an empty list to satisfy the interface. + """ + logger.warning("Usage logging not supported in FSCacheAdapter, returning empty list") + return [] + async def close(self): if self.cache is not None: self.cache.expire()