# Dependency choices
Upstream `@nestjs/cache-manager` uses npm packages:
- `cache-manager` for the cache facade.
- `keyv` for store adapters and namespacing.
- `cacheable` for primary/secondary non-blocking store composition.
- `rxjs` for interceptor response streams.
There is a Rust crate named `cache_manager`, but it is a filesystem cache path
manager, not a runtime key/value cache facade. It is therefore not a correct
replacement for npm `cache-manager`.
This port uses:
- `moka` with the `future` feature as the in-memory cache engine. `moka` is a
maintained concurrent cache inspired by Caffeine and supports async usage.
- `async-trait` for Keyv-like async store adapter traits.
- `serde` and `serde_json` for storing arbitrary cache values.
- `thiserror` for cache errors.
- `tokio` for async tests and timing.
Ported local utilities:
- `KeyvStoreAdapter` normalizes external store behavior behind
`get/set/del/reset/disconnect`.
- `Keyv` applies namespace and default TTL when wrapping an adapter.
- `CacheManager` provides the Nest-facing facade and lifecycle method.
- Per-entry TTL is tracked in a local `CacheEntry` wrapper because `moka`'s
future cache does not expose npm-style `set(key, value, ttl)` directly.