Registry / utility / retainer

retainer

JSON →
library0.4.0rscratesunverified

Minimal async cache with support for key expirations.

# Cargo.toml [dependencies] retainer = "0.4.0"
INSTALL
IMPORT
SIG · RETAINER
R
retainer
utilityrustv0.4.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Cache
✓ use retainer::Cache;

Create an async cache and insert/retrieve a value.

use retainer::Cache; #[tokio::main] async fn main() { let cache = Cache::new(); cache.insert("key", "value").await; println!("{:?}", cache.get("key").await); }
Debug
Known issues
gotchaRequires an async runtime like Tokio.
fix
Add tokio as a dependency and use #[tokio::main] or another runtime.
affects: >=0.4.0
Upgrade
Version history
0.4.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
retainer — cargo add retainer · libregistry