| Crates.io | plain-cache |
| lib.rs | plain-cache |
| version | 0.2.2 |
| created_at | 2025-06-08 13:29:43.005083+00 |
| updated_at | 2025-07-06 09:34:56.853621+00 |
| description | Highly performant thread-safe cache with a focus on simplicity |
| homepage | |
| repository | https://github.com/christianschleifer/plain-cache |
| max_upload_size | |
| id | 1704880 |
| size | 45,526 |
plain-cache is a high-performance, thread-safe cache implementation that makes no use of unsafe
Rust code. It implements the S3-FIFO eviction
algorithm [see]. plain-cache allocates
its capacity at cache instantiation time and is designed for high-throughput scenarios with minimal
contention.
use plain_cache::Cache;
let cache = Cache::with_capacity(1000);
cache.insert("key", "value");
assert_eq!(cache.get("key"), Some("value"));