Umbral Cache
Official by Umbral contributorsambient cache, response caching, Redis/in-memory backends
About
The fastest query is the one you don't run twice. Umbral Cache installs a process-wide in-memory cache as an ambient handle — reach for it from any handler to memoise an expensive aggregate, a rendered fragment, or a third-party API response. When a whole page is safe to share, an opt-in cache_page layer caches the entire response. No client to configure, no keys to manage in dev.
Install
Wire it up
use *;
use ;
let app = builder
.database
.plugin
.build?;
Target: memoise an expensive dashboard query
Read from the ambient handle, compute on a miss, store for next time.
use ambient;
async
What you get
- Process-wide in-memory cache as an ambient handle
- Reach it from any handler — no wiring through call stacks
- Opt-in
cache_pagelayer for whole-response caching - A pluggable backend so a shared store can slot in later
Usage
Install `CachePlugin::new(Cache::memory())` to register the ambient cache handle, then reach it from any handler with `umbral_cache::ambient()`. Layer `cache_page` only on responses that are safe to share (anonymous, non-per-user).
cargo add umbral-cache
Feature tracker
Per-feature shipping status, recorded in the directory.
Install one cache and read it from any handler.
Serde-backed values with per-key TTL support.
In-process cache for development and single-process apps.
Persistent local cache backed by an explicit SQLite pool.
Feature-gated Redis backend with connection-manager reconnects.
Caches eligible GET/HEAD responses and skips private/no-store.
Optional compression, Cache-Control, and Vary headers.
Compatibility
Declared support per Umbral version and database backend.
No compatibility rows declared yet.
Community notes
0 notes in the discussion thread.
No notes yet. Be the first to share how this plugin works for you.
Reported issues
Bugs and abuse reports filed against this plugin.
No open issues
No issues have been reported against this plugin. Track upstream bugs on the maintainer's tracker, or report a directory problem to the Umbral team.