Encore Go Redis Caching

•
25
•

Implements type-safe Redis caching with TTL configurations and atomic operations in Encore Go backend services.

Enables developers to easily configure and utilize Redis caching in Encore Go applications using the `encore.dev/storage/cache` package. It provides domain-specific guidance on declaring cache clusters, setting up typed keyspaces (strings, integers, structs, lists, and sets), managing TTL options, and executing atomic operations like increments and conditional sets. This skill ensures your Go application benefits from efficient, type-safe, and low-latency ephemeral data storage.

주요 기능

01Enables atomic increment/decrement operations and conditional writes like SetIfNotExists.
02Declares type-safe caching clusters with configurable eviction policies like LRU, LFU, and Volatile TTL.
03Supports specialized keyspace types including String, Int, Struct, Float, List, and Set.
04Handles error matching for cache misses (cache.Miss) and duplicate keys (cache.KeyExists).
05Provides built-in TTL helper functions for relative, daily UTC, or infinite caching lifetimes.
0625 GitHub stars

사용 사례

01Implementing rate-limiting counters using atomic integer keyspaces.
02Caching API responses and database queries to speed up hot reads.
03Storing short-lived tokens, user sessions, or leaderboard data.