Everything in the MongoDB kit, plus cache done right. Tag-based invalidation, FailOpen behaviour, and a one-flag toggle to disable Redis entirely.
Use code FIRSTXPEOPLE for €15 off → €30
Tech stack
BaseRepository with 7 hooks, offset + cursor pagination, ErrorOr result pattern, RFC 7807 error handler, health checks, Swagger with XML docs, Docker Compose. All included.
Get, insert, update, and delete operations in the base repository transparently check and populate the Redis cache.
Every cached entry is tagged by entity type, entity ID, and custom tags. When a document changes, all entries sharing any of those tags are invalidated automatically — no stale data.
FailOpen (default) — if Redis is unreachable, the request falls through to MongoDB. FailClosed — errors are surfaced immediately. Toggle per environment via a single config flag.
Set Cache:Enabled = false and Redis is never connected. A no-op NullCacheService is injected instead. Health check removed automatically. No code changes required.
StackExchange.Redis is wire-protocol compatible with Valkey. A docker-compose.valkey.yml is included. Run it with: docker compose -f docker-compose.valkey.yml up --build.
Pricing
Full source code, private docs, unlimited projects, entire team included.
or €30 with code FIRSTXPEOPLE
Secure checkout via Lemon Squeezy · Instant delivery
Need auth too? See the full stack kit →