⬆️ bump simpleredis to the pooled build, teach the e2e mock RESP

The pooled simpleredis sends RESP arrays instead of inline commands, so
the e2e redis stand-in answered +OK to the "*2" header and the plugin
read "OK" as a cached verdict, blocking a request that should pass.
The mock now parses RESP arrays, still accepts inline, and handles MGET.

Points at pool-redis-connections until maxlerebourg/simpleredis#8 is
tagged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
mhx
2026-09-04 11:07:18 +02:00
co-authored by Claude Opus 5
parent 3ceb9617f2
commit 4e2bfeb142
6 changed files with 353 additions and 138 deletions
+7 -2
View File
@@ -1,8 +1,13 @@
# simpleredis
Minimal go redis with only `get`, `set` and `delete` operation.
Minimal go redis with only `get`, `mget`, `set` and `delete` operation.
It supports password authentication with redis.
With **NO** external dependencies.
Connections are pooled: a command reuses an already authenticated connection when
one is idle, so `AUTH` and `SELECT` are paid once per connection instead of once
per command. A `SimpleRedis` is safe for concurrent use and must not be copied
once initialized.
## Example
```go
import simpleredis "github.com/maxlerebourg/simpleredis"
@@ -11,7 +16,7 @@ var redis simpleredis.SimpleRedis
redis.Init("redis:6379", "", "") // redisHost, redisPass, redisDatabase
err := redis.Set("test", []bytes("whatever"), 60), // Set key "test" with "whatever" for 60 seconds
err := redis.Set("test", []byte("whatever"), 60) // Set key "test" with "whatever" for 60 seconds
if err != nil {
...
}