{"repo":"pardnchiu/go-redis-fallback","free":true,"listed":false,"github":"https://github.com/pardnchiu/go-redis-fallback","clone":"git clone https://github.com/pardnchiu/go-redis-fallback.git","description":"Redis client with graceful fallback","language":"Go","stars":16,"topics":["redis","pardnchiu","golang","redis-client","backend"],"license":"MIT","category":"databases-storage","readme_excerpt":"[!Note] This content is translated by LLM. Original text can be found here Redis Fallback A Golang Redis fallback solution that automatically switches to local storage when the connection is unavailable and restores data when the connection is recovered. Inspired by the integration concepts of php-redis, php-cache-fallback, and php-session-fallback. Key Features Three-Tier Storage Architecture Memory cache + Redis + local file storage with automatic fault tolerance. Graceful Fallback and Auto-Recovery Monitors Redis health during fallback and automatically synchronizes data and cleans local files upon recovery. Ensuring Data Integrity Stores data as JSON files during fallback mode to prevent loss, with TTL support. Flowchart Click to view Dependencies - github.com/redis/go-redis/v9 - github.com/pardnchiu/go-logger If you don't need it, you can fork and replace it with your preferred logger. You can also vote here to let me know. Usage Installation [!NOTE] Latest commits may change. Recommended to use tagged versions. Commits containing only documentation updates or non-functional changes will be rebased later. Initialization Configuration Available Functions Instance Management - New - Create a new instance - Initializes Redis connection - Sets up the logging system - Checks for unsynced files - Close - Close the instance - Closes Redis connection - Clears pending writes - Releases system resources Data Management - Set - Insert data Automatically switches to local storage wh","default_branch":null,"files":null,"tree":[],"storefront":"/r/pardnchiu","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/pardnchiu/go-redis-fallback/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."}