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
HSET unexpectedly mutates the list passed to items (#3103)acl_genpass with bits (#3062)FT.PROFILE result (#3063)disable_decoding in async read_response with hiredis parser. (#3042)JSON.OBJLEN type hint (#2966)HDEL type hint (#3029)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
HSET unexpectedly mutates the list passed to items (#3103)JSON.OBJLEN type hint (#2966)HDEL type hint (#3029)We'd like to thank all the contributors who worked on this release!
@AYMENJD, @AniketP04, @BackflipPenguin, @ING-XIAOJIAN, @MrDenkoV, @Pedram-Parsian, @TheBlusky, @akx, @chayim, @d184230, @danielzhangau, @dependabot, @dependabot[bot], @dmkulazhenko, @dvora-h, @enjoy-binbin, @jakob-keller, @kristjanvalur, @mattwang44, @parmenashp, @r0ro, @sjpotter, @tbbream, @trkwyk, @zware and @zxjlm
We'd like to thank all the contributors who worked on this release!
@dvora-h
acl_genpass with bits (#3062)FT.PROFILE result (#3063)disable_decoding in async read_response with hiredis parser. (#3042)We'd like to thank all the contributors who worked on this release!
@AYMENJD, @AniketP04, @BackflipPenguin, @MrDenkoV, @Pedram-Parsian, @akx, @chayim, @d184230, @danielzhangau, @dependabot, @dependabot[bot], @dvora-h, @enjoy-binbin, @jakob-keller, @kristjanvalur, @parmenashp, @r0ro, @sjpotter, @tbbream and @zware
We'd like to thank all the contributors who worked on this release!
@chayim, @d184230, @danielzhangau, @dependabot, @dependabot[bot], @dvora-h, @kristjanvalur, @r0ro and @sjpotter
ModuleCommands in cluster (#2951)RPUSHX (#2949)Redis.from_pool() class method, for explicitly owning and closing a ConnectionPool (#2913)push_request keyword argument to read_response (#2922)clear_connect_callbacks with _deregister_connect_callback (#2955)We'd like to thank all the contributors who worked on this release!
@AOrazaev, @akx, @anio, @chayim, @dvora-h, @elfkuzco, @hauntsaninja, @kristjanvalur, @meiravgri, @uglide and @yangbodong22011
Triggers and Functions allow you to execute server-side functions triggered when key values are modified or created in Redis, a stream entry arrival, or explicitly calling them. Simply put, you can replace Lua scripts with easy-to-develop JavaScript or TypeScript code. Move your business logic closer to the data to ensure a lower latency, and forget about updating dependent key values manually in your code. Try it for yourself with Quick start
Python 3.7 has reached its end-of-life (EOL) as of June 2023. This means that starting from this date, Python 3.7 will no longer receive any updates, including security patches, bug fixes, or improvements. If you continue to use Python 3.7 post-EOL, you may expose your projects and systems to potential security vulnerabilities. We ended its support in this version and strongly recommend migrating to Python 3.10.
CONTRIBUTING.md (#2848)We'd like to thank all the contributors who worked on this release!
@JoanFM, @Ovsyanka83, @chayim, @dependabot, @dependabot[bot], @dvora-h, @kristjanvalur, @kurtmckee, @pall-j and @shacharPash
SISMEMBER return type to int by (#2813)JSON.MERGE command (#2761)JSON.MSET command (#2766)WAITAOF (#2760)WITHSCORE argument to ZRANK (#2758)connect method of all Redis connection classes (#2631)We'd like to thank all the contributors who worked on this release!
@Smit-Parmar, @TheKevJames, @aciddust, @bmacphee, @bodevone, @dvora-h, @kristjanvalur, @shacharPash, @shahar-lev, @vmihailenco and @woutdenolf
CLIENT NO-TOUCH (#2745)CLUSTER MYSHARDID (#2704)WITHSCORES argument to ZREVRANK command (#2725)XADD: allow non negative maxlen (#2739)SLOWLOG GET return value (#2732)ClusterCommandProtocol type (#2729)TOPK list example. (#2724)We'd like to thank all the contributors who worked on this release!
@AYMENJD, @Anthchirp, @Avasam, @NickG123, @SoulPancake, @aciddust, @chayim, @cristianmatache, @dvora-h, @felipou, @kristjanvalur, @mirekdlugosz, @mzdehbashi-github, @oranav, @scoopex, @shacharPash and @tylerhutcherson
This beta release includes 2 bug fixes for the RESP3 parser.
COMMAND response callback (#2740)This release includes only support for RESP3, it should be treated as a beta. Please note response types change for those using RESP3 - meaning there breaking changes. Today this includes support for the following:
The following are not yet implemented:
RESP3 support introduces two different ways to enable a RESP3 redis connection, when your redis server supports it.
import redis
r = redis.Redis.from_url("redis://localhost:6379?protocol=3")
r.ping()
protocol=3 into any existing connection object eg:from redis.asyncio import Redis
r = Redis(host="localhost", port=6379, protocol=3)
r.ping()
Upgrade urgency: SECURITY, contains fixes to security issues.
Upgrade urgency: SECURITY, contains fixes to security issues.
We'd like to thank all the contributors who worked on this release!
@bellini666, @chayim, @dvora-h, @shacharPash and @woutdenolf
This release includes only support for RESP3, it should be treated as a beta. Please note response types change for those using RESP3 - meaning there breaking changes. Today this includes support for the following:
The following are not yet implemented:
This release introduces two different ways to enable a RESP3 redis connection, when your redis server supports it.
import redis
r = redis.Redis.from_url("redis://localhost:6379?protocol=3")
r.ping()
protocol=3 into any existing connection object eg:from redis.asyncio import Redis
r = Redis(host="localhost", port=6379, protocol=3)
r.ping()