- Go 90.4%
- Makefile 7.3%
- Dockerfile 2.3%
* chore(deps): bump actions/setup-go to v7 Self-hosted CI workflows. * ci: disable setup-go cache on self-hosted * ci: clean retrigger * ci: drop redis service container on self-hosted Actions service containers need Docker; tests already use miniredis. * ci: unset REDIS_ADDR so tests use miniredis |
||
|---|---|---|
| .github | ||
| cmd/module | ||
| deploy | ||
| internal | ||
| test | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| .golangci.yml | ||
| CHANGELOG.md | ||
| COMPATIBILITY.md | ||
| CONTRIBUTING.md | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| Makefile | ||
| muxcore.json | ||
| README.md | ||
| SECURITY.md | ||
Cache Redis
Redis-backed distributed cache provider.
A MuxCore sidecar module that implements the cache / cache.redis capabilities over Redis.
gRPC surface: Get, Set (optional TTL), Delete, Exists, Incr, CompareAndSwap, Lock / Unlock, Publish / Subscribe.
How It Works
Module request ──→ cache-redis (gRPC) ──→ Redis
Requires a reachable Redis instance. Values are opaque bytes; TTL is honored on Set and Lock.
Tests: unit tests use miniredis (no Docker). Self-hosted CI also starts redis:7-alpine and runs a live round-trip when Redis is reachable; otherwise the live test skips.
Laptop demos that do not need a shared Redis should prefer cache-local (spool default). Opt into this module with spool tag cache-redis.
Configuration
| Variable | Default | Description |
|---|---|---|
REDIS_ADDR |
localhost:6379 |
Redis host:port |
REDIS_PASSWORD |
`` | Redis password (optional) |
REDIS_DB |
0 |
Redis database index |
CACHE_GRPC_ADDR |
:9600 |
gRPC listen address |
MUXCORE_GRPC_ADDR |
— | Core mesh address (or --muxcore-mesh-addr) |
MUXCORE_MODULE_ID |
cache-redis |
Module ID override (or --muxcore-module-id) |
Quick Start
make build
export REDIS_ADDR=localhost:6379
./cache-redis --muxcore-mesh-addr localhost:9090
Core must be reachable (dev: MUXCORE_INSECURE_DISABLE_TLS=true ./muxcored in ../core).
Capability
cache — Distributed cache (Redis)
License
GPL-3.0