From 90cf79b4206f757efde1970117e9dce282491516 Mon Sep 17 00:00:00 2001 From: hajdul88 <52442977+hajdul88@users.noreply.github.com> Date: Thu, 15 Jan 2026 11:10:13 +0100 Subject: [PATCH] feat: adds new config params to Cacheconfig --- cognee/infrastructure/databases/cache/config.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cognee/infrastructure/databases/cache/config.py b/cognee/infrastructure/databases/cache/config.py index 88ac05885..de316d3fe 100644 --- a/cognee/infrastructure/databases/cache/config.py +++ b/cognee/infrastructure/databases/cache/config.py @@ -13,6 +13,8 @@ class CacheConfig(BaseSettings): - cache_port: Port number for the cache service. - agentic_lock_expire: Automatic lock expiration time (in seconds). - agentic_lock_timeout: Maximum time (in seconds) to wait for the lock release. + - usage_logging: Enable/disable usage logging for API endpoints and MCP tools. + - usage_logging_ttl: Time-to-live for usage logs in seconds (default: 7 days). """ cache_backend: Literal["redis", "fs"] = "fs" @@ -24,6 +26,8 @@ class CacheConfig(BaseSettings): cache_password: Optional[str] = None agentic_lock_expire: int = 240 agentic_lock_timeout: int = 300 + usage_logging: bool = False + usage_logging_ttl: int = 604800 model_config = SettingsConfigDict(env_file=".env", extra="allow") @@ -38,6 +42,8 @@ class CacheConfig(BaseSettings): "cache_password": self.cache_password, "agentic_lock_expire": self.agentic_lock_expire, "agentic_lock_timeout": self.agentic_lock_timeout, + "usage_logging": self.usage_logging, + "usage_logging_ttl": self.usage_logging_ttl, }