{"repo":"Turall/cache-house","free":true,"listed":false,"github":"https://github.com/Turall/cache-house","clone":"git clone https://github.com/Turall/cache-house.git","description":null,"language":"Python","stars":16,"topics":["fastapi","redis","redis-cache","redis-cluster","python","caching"],"license":"MIT","category":"databases-storage","readme_excerpt":"Caching tool for python, working with Redis single instance and Redis cluster mode PyPi link Features ### - ✅ Automatic reconnection : Redis client handles reconnection automatically - ✅ Graceful degradation : Falls back to in-memory cache when Redis is unavailable - ✅ No crashes : All operations handle errors gracefully - ✅ Async & Sync support : Works with both async and sync functions - ✅ Redis Cluster support : Works with single Redis instance and Redis Cluster - ✅ Custom encoders/decoders : Support for custom serialization Installation ### or with poetry Quick Start ### Cache decorator works with both async and sync functions. The library automatically handles Redis reconnection and falls back to in-memory cache when Redis is unavailable. Output: Check stored cache keys: Setup Redis cache instance You can pass all redis-py arguments to RedisFactory.init method and additional arguments: Cluster auto-detection By default ( autodetect cluster=True ), RedisFactory.init will: - Try to send CLUSTER INFO to the target Redis node - If the command succeeds → cluster mode is detected , and RedisClusterCache is used internally - If the command fails with a Redis error → standalone mode is assumed , and RedisCache is used This means you can usually just call: and cache-house will automatically choose the correct backend (standalone or cluster) based on the Redis server configuration. Explicit modes (optional) - Force standalone Redis (no detection) : - Force Redis Cluster (no detect","default_branch":null,"files":null,"tree":[],"storefront":"/r/Turall","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Turall/cache-house/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}