Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ jobs:
- name: Enforce core-engine coverage floor (90%)
run: cargo llvm-cov -p core-engine --summary-only --fail-under-lines 90

# server-native is mostly async I/O drivers — accept loops, TLS handshakes,
# The server crate is mostly async I/O drivers — accept loops, TLS handshakes,
# replication streams — which are exercised by the socket-driven tests
# rather than unit tests. The floor is set to protect the pure decision
# functions (scope classification, wire encoding, config parsing), not to
# chase a number the I/O layer cannot reach.
- name: Enforce server-native coverage floor (65%)
- name: Enforce recached (server) coverage floor (65%)
run: cargo llvm-cov -p recached --summary-only --fail-under-lines 65 -- --include-ignored

# ---------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to Recached are documented here.

---

## [0.2.5] — Unreleased
## [0.3.0] — 2026-08-03

### Added

Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ resolver = "2"
# ── Single source of truth for all crate versions ────────────────────────────
# Members inherit with: version.workspace = true / edition.workspace = true
[workspace.package]
version = "0.2.5"
version = "0.3.0"
edition = "2024"
license = "Apache-2.0"
authors = ["ThinkGrid Labs"]
Expand Down
6 changes: 3 additions & 3 deletions Formula/recached.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Recached < Formula
desc "Blazing fast, multi-core drop-in replacement for Redis"
homepage "https://github.com/recached-dev/recached"
version "0.2.5"
version "0.3.0"
license "Apache-2.0"

# The checksums below are placeholders until the v0.2.4 release artifacts
Expand All @@ -16,11 +16,11 @@ class Recached < Formula
# placeholder makes brew fail loudly, which is the far better failure.
on_macos do
on_intel do
url "https://github.com/recached-dev/recached/releases/download/v0.2.5/recached-macos-amd64"
url "https://github.com/recached-dev/recached/releases/download/v0.3.0/recached-macos-amd64"
sha256 "REPLACE_WITH_AMD64_SHA256"
end
on_arm do
url "https://github.com/recached-dev/recached/releases/download/v0.2.5/recached-macos-arm64"
url "https://github.com/recached-dev/recached/releases/download/v0.3.0/recached-macos-arm64"
sha256 "REPLACE_WITH_ARM64_SHA256"
end
end
Expand Down
20 changes: 7 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ The same Rust cache engine runs natively on your server (RESP on port 6379 — a

> [!NOTE]
> Recached is not a full Redis replacement. It covers the subset most applications actually need: strings, expiry, counters, all collection types, transactions, pub/sub, and observable keys. Best fit: reactive UIs, session caches, browser-side API response caching, and rate limiting.
>
> Notably absent: **Lua scripting (`EVAL`)**, **blocking operations** (`BLPOP`, `BRPOP`, `LMOVE`) and **streams** (`XADD`). Your Redis *client* will connect unchanged, but libraries built on those primitives — BullMQ, node-redlock, rate-limiter-flexible — ship Lua and will not run. `RLCHECK`/`RLSET` cover rate limiting natively instead. Run `COMMAND COUNT` against a live server for the exact surface (123 commands today).

**→ Full documentation, use cases, API reference, and guides at [recached.dev](https://recached.dev)**

Expand All @@ -32,8 +34,8 @@ docker run -p 6379:6379 -p 6380:6380 ghcr.io/recached-dev/recached:latest
# Homebrew (macOS)
brew tap recached-dev/recached && brew install recached && recached-server

# Cargo
cargo install recached && recached-server
# Cargo (from source — the crate is not on crates.io yet)
cargo install --git https://github.com/recached-dev/recached recached && recached-server
```

```bash
Expand All @@ -42,16 +44,8 @@ npm install recached-edge
```

> [!IMPORTANT]
> **`recached-edge` 0.1.1 – 0.2.0 do not work in the browser.** `core-engine` read the clock via
> `std::time::SystemTime::now()`, which panics on `wasm32-unknown-unknown`. The clock is read on
> nearly every operation, so **no store write completes** on those versions — and a client whose
> write-ahead log passed the compaction threshold erased its own persisted cache before the
> replacement snapshot was written.
>
> Fixed in **0.2.1** — install `recached-edge@^0.2.1` or later.
>
> **The server is unaffected.** It runs on a native target where the clock works normally; this is
> browser/WASM only.
> **0.3.0 is the first stable release.** Install `recached-edge@^0.3.0`; earlier versions are not
> recommended.

---

Expand Down Expand Up @@ -104,7 +98,7 @@ password, no TLS, and no restriction on which web pages may open the sync socket

## Benchmarks

Measured with `redis-benchmark` (100k requests, 50 connections, 64-byte values, randomized keys, persistence disabled on all servers) on a 4-core Intel i5-8259U laptop, July 2026 — Recached v0.1.8 vs Redis 7.2.5 vs Valkey 9.1.0, one server at a time. Current release is v0.2.4; these command paths were A/B tested across the v0.2.4 changes and moved within run-to-run noise, but the three-way suite has not been re-run since v0.1.8.
Measured with `redis-benchmark` (100k requests, 50 connections, 64-byte values, randomized keys, persistence disabled on all servers) on a 4-core Intel i5-8259U laptop, July 2026 — Recached v0.1.8 vs Redis 7.2.5 vs Valkey 9.1.0, one server at a time. Current release is v0.3.0; these command paths were A/B tested across the v0.2.4 changes and spot-checked again on v0.3.0 (SET 455k, GET 518k, INCR 526k pipelined on the same laptop), moving within run-to-run noise each time — but the three-way suite has not been re-run since v0.1.8.

Pipelined (`-P 16`) — raw command throughput, requests/sec, **bold** = best per row:

Expand Down
2 changes: 1 addition & 1 deletion docs/server/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Recached is configured entirely through environment variables. There is no confi
| `RECACHED_EVICTION` | `noeviction` | Eviction policy when `RECACHED_MAX_KEYS` is reached. See eviction policies below. |
| `RECACHED_PORT` | `6379` | TCP port the RESP listener binds. Set it to run a second instance on one host — alongside a primary, for example — or to move off 6379, the first port a commodity scanner probes. The port is not a security control (`RECACHED_BIND`, `RECACHED_PASSWORD`, TLS and the allowlists are), so changing it hides nothing on its own. An invalid value, `0`, or a value equal to `RECACHED_WS_PORT` makes the server **refuse to start**, rather than falling back to 6379 and serving the keyspace on a port the operator believes is closed. Ports below 1024 require root on Unix. |
| `RECACHED_WS_PORT` | `6380` | TCP port the WebSocket sync listener binds. Same rules as `RECACHED_PORT`, and the two must differ. Running more than one instance per host means giving each its own `RECACHED_PORT`, `RECACHED_WS_PORT` and `RECACHED_METRICS_PORT`. |
| `RECACHED_METRICS_PORT` | `9091` | Port for the Prometheus metrics HTTP server. Metrics are available at `/metrics`. Set to `0` to disable the exporter entirely. An invalid value makes the server **refuse to start**. Before 0.2.5, `0` bound an OS-assigned ephemeral port instead of disabling anything, so metrics stayed exposed on an unpredictable port; and a collision on this port aborted startup with a panic rather than an explanation. |
| `RECACHED_METRICS_PORT` | `9091` | Port for the Prometheus metrics HTTP server. Metrics are available at `/metrics`. Set to `0` to disable the exporter entirely. An invalid value makes the server **refuse to start**. Before 0.3.0, `0` bound an OS-assigned ephemeral port instead of disabling anything, so metrics stayed exposed on an unpredictable port; and a collision on this port aborted startup with a panic rather than an explanation. |
| `RECACHED_SAVE_PATH` | `recached.rdb` | Path to the snapshot file. The server loads this file on startup and writes to it on `SAVE`, `BGSAVE`, autosave, and clean shutdown. |
| `RECACHED_SAVE` | _(none)_ | Multi-condition autosave policy as comma-separated `seconds:changes` pairs. A snapshot is triggered when **any** condition is satisfied: `elapsed_since_last_save >= seconds` **and** `dirty_writes >= changes`. Example: `"900:1,300:10,60:10000"` — save after 1 write in 15 min, 10 writes in 5 min, or 10 000 writes in 1 min. When set, `RECACHED_SAVE_INTERVAL` is ignored. Skips saves when no writes have occurred since the last snapshot. |
| `RECACHED_SAVE_INTERVAL` | `900` | Autosave interval in seconds (single-condition fallback when `RECACHED_SAVE` is not set). The server saves automatically at this interval if at least one write has occurred since the last save. Set to `0` to disable autosave entirely (manual `SAVE`/`BGSAVE` still work). |
Expand Down
2 changes: 1 addition & 1 deletion sdks/recached-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@recached/react",
"version": "0.2.5",
"version": "0.3.0",
"description": "Official React hooks for Recached \u2014 zero-latency reactive cache",
"type": "module",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion sdks/recached-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@recached/vue",
"version": "0.2.5",
"version": "0.3.0",
"description": "Official Vue 3 composables for Recached \u2014 zero-latency reactive cache",
"type": "module",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion wasm-edge/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "recached-edge",
"description": "Browser and edge WebAssembly client for Recached \u2014 zero-latency local cache with automatic server sync",
"version": "0.2.5",
"version": "0.3.0",
"type": "module",
"main": "sdk.js",
"module": "sdk.js",
Expand Down
Loading