import redis
# enable csc
r = redis.Redis(
"localhost", 6379, protocol=3,
cache_enabled=True, cache_ttl=100, cache_max_size=1000,
# cache_blacklist=["GET", "LLEN"] # if needed, you can exclude certain commands from caching
)
r.set("foo", "bar")
r.get("foo")
r.get("foo") # this will be fetched from cache
# manually invalidate key in cache
r.invalidate_key_from_cache("foo")
# or flush the entire cache
r.flush_cache()
We'd like to thank all the contributors who worked on this release!
@AYMENJD, @AniketP04, @BackflipPenguin, @ING-XIAOJIAN, @MrDenkoV, @Pedram-Parsian, @TheBlusky, @ahmedabdou14, @akx, @chayim, @d184230, @danielzhangau, @dependabot, @dependabot[bot], @dmkulazhenko, @dvora-h, @enjoy-binbin, @hongqn, @jakob-keller, @kristjanvalur, @mattwang44, @parmenashp, @poiuj, @r0ro, @sjpotter, @tbbream, @trkwyk, @w-miller, @wKollendorf, @zakaf, @zware and @zxjlm
Fetched May 1, 2026