Repository navigation
Release Notes
This release adds an in-memory client for tests and support for servers that only speak RESP2.
-
In-memory client for tests.
sage-testkitprovidesInMemorySageClient, aSageClientthat needs no Redis server, for every backend. Code that takes aSageClientcan be tested with it unchanged. See Testing.def visit(client: SageClient, page: String) = client.incr(s"visits:$page") test("counts visits") { val client = InMemorySageClient() for { _ <- visit(client, "home") count <- visit(client, "home") } yield assertTrue(count == 2L) }
-
RESP2 fallback. When a server rejects
HELLO 3, Sage now continues with RESP2, so it can connect to Redis before 6.0 and to RESP2-only proxies. The newSageConfig.protocolsetting controls this. See Protocol version. -
Bug fixes. On Valkey, JSON length and key queries on a missing key no longer fail to decode. The direct backend no longer risks a stack overflow in some recursive loops.
-
Binary compatibility. The new
SageConfigfield breaks binary compatibility with 0.5.0. Source compatibility is kept.
What's Changed
- Add an in-memory client for tests that need no Redis server by @ghostdogpr in #282
- Fall back to RESP2 when RESP3 is unavailable by @ghostdogpr in #284