fix: cleanup cache logs
This commit is contained in:
parent
4ee2f8bd0c
commit
414964dc4e
|
|
@ -216,7 +216,7 @@ Honcho supports Redis caching to improve performance by caching frequently acces
|
|||
CACHE_ENABLED=false # Set to true to enable caching
|
||||
|
||||
# Redis connection
|
||||
CACHE_URL=redis://localhost:6379/0?suppress=false
|
||||
CACHE_URL=redis://localhost:6379/0?suppress=true
|
||||
|
||||
# Cache namespace and TTL
|
||||
CACHE_NAMESPACE=honcho # Prefix for all cache keys
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ class CacheSettings(HonchoSettings):
|
|||
model_config = SettingsConfigDict(env_prefix="CACHE_", extra="ignore") # pyright: ignore
|
||||
|
||||
ENABLED: bool = False
|
||||
URL: str = "redis://localhost:6379/0?suppress=false"
|
||||
URL: str = "redis://localhost:6379/0?suppress=true"
|
||||
NAMESPACE: str | None = None
|
||||
DEFAULT_TTL_SECONDS: Annotated[int, Field(default=300, ge=1, le=86_400)] = (
|
||||
300 # how long to keep items in cache
|
||||
|
|
|
|||
|
|
@ -64,6 +64,10 @@ logging.basicConfig(
|
|||
)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Suppress cashews Redis error logs (NoScriptError, ConnectionError, etc.)
|
||||
# These are handled gracefully by SafeRedis and don't need full tracebacks
|
||||
logging.getLogger("cashews.backends.redis.client").setLevel(logging.CRITICAL)
|
||||
|
||||
|
||||
# JWT Setup
|
||||
async def setup_admin_jwt():
|
||||
|
|
|
|||
Loading…
Reference in New Issue