Vaultx.Cache.Adapters.Memory (Vaultx v0.7.0)
View SourceSimple in-memory L2 cache adapter.
This adapter provides a basic in-memory cache that can be shared across processes using ETS. It's suitable for single-node deployments or when Redis is not available.
Features
- ETS-based storage for cross-process sharing
- TTL support with automatic expiration
- Pattern-based clearing
- Memory usage tracking
- No external dependencies
Configuration
config :vaultx, :cache,
l2_adapter: Vaultx.Cache.Adapters.Memory,
l2_max_size: 50_000,
l2_ttl_default: :timer.hours(1)Limitations
- Single-node only (no distribution)
- Memory-limited storage
- No persistence across restarts
- Basic eviction policies