Skip to content

v2.0.1

Choose a tag to compare

@wutlu wutlu released this 22 Oct 13:26
· 13 commits to main since this release
28219e0

BoltCache 2.0 is a ground-up rework: it now works with redis-cli, redis-benchmark and Redis client libraries, and it's about 2x faster than 1.0. This patch release makes go install work and restores the release notes that were missing from 2.0.0.

Fixed in 2.0.1

  • go install github.com/wutlu/boltcache/v2@latest works. Go requires a /v2 suffix in the module path of v2+ releases, so the module path is now github.com/wutlu/boltcache/v2.
  • Release notes are included in GitHub releases again.

What's new in 2.0

  • Redis compatible: 120 commands over RESP: strings, lists, sets, hashes, TTL/SCAN, pub/sub, MULTI/EXEC/WATCH, INFO... 1.x answered only PING/SET/GET and hung on everything else.
  • Real Lua scripting with EVAL/EVALSHA. Scripts are atomic, sandboxed and time-limited.
  • Eviction: max_memory and max_keys are enforced with lru, lfu, random, ttl or noeviction.
  • Crash-safe persistence: types and binary data survive restarts, and 1.x data files are converted automatically.
  • Security: token auth is now actually enforced on REST, RESP and TCP. There's also CSRF protection, rate limiting and TLS for HTTP.
  • Ops: Prometheus /metrics, /health, JSON logs, a multi-arch distroless Docker image, and binaries for Linux, macOS, Windows and FreeBSD.
  • Fixes for data races, data loss after restarts, dropped commands and an XSS in the web client.

On an M1 Pro with redis-benchmark, BoltCache is ahead of Redis 8.4: +5–10% without pipelining and 1.25–2x with pipeline 16.

⚠️ Upgrading from 1.x

  • Authentication is enforced when security.auth.enabled is true.
  • Writing a different type to an existing key returns WRONGTYPE.
  • Port 6381 and the cluster command were removed.
  • cors_origins defaults to same-origin.

See the full changelog and the README's Upgrading from 1.x section.

Install

docker run -d -p 6382:6382 -p 8090:8090 -v boltcache-data:/data ghcr.io/wutlu/boltcache:2.0.1
go install github.com/wutlu/boltcache/v2@v2.0.1

Or download a binary below. Then: redis-cli -p 6382 PING.