In-Memory Storage
Fast, local storage for development and single-instance deployments.
The InMemoryStore is the default storage backend. It stores rate limit counters in the application's memory.
Usage
import { InMemoryStore } from 'halt';
const store = new InMemoryStore();Pros & Cons
Pros
- Zero dependencies
- Extremely fast (µs latency)
- Great for local development
Cons
- State is lost on restart
- Not shared across multiple instances/processes
- Memory usage grows with keys