Storage Comparison
Compares supported data types, runtimes, and durability across backends.
If you are unsure which backend to choose, compare supported data types and runtimes in this table. For installation, see Installation.
How to Choose
- For tests and temporary storage, use Memory.
- In browsers, prefer OPFS or IndexedDB; for strings only, use Local Storage.
- In Node.js, use Node.js Filesystem; in Bun, use Bun Filesystem.
- For external services, pick an S3, Redis, Valkey, Memcached, etcd, Cloudflare, or Vercel backend matching your environment.
- To tolerate transient failures, wrap with Retry; to keep deletions, wrap with Soft Delete.
Comparison Table
| Backend | Supported data types | Streams | Runtime |
|---|---|---|---|
| Memory | Arbitrary values | Supported. Chunks are Uint8Array. |
No restrictions. |
| Null | Stores nothing | Accepts writes only. Reads always fail. | No restrictions. |
| LRU Cache | Arbitrary values | Supported. Chunks are Uint8Array. |
No restrictions. |
| HTTP | Uint8Array |
Supported. | No restrictions. Requires a server. |
| OPFS | Uint8Array |
Supported. | Browser and worker only. |
| IndexedDB | Arbitrary values | Supported. | Browser only. |
| Local Storage | Strings | Not supported. | Browser only. |
| Session Storage | Strings | Not supported. | Browser only. |
| Cache Storage | Response |
Supported. | Browser and worker only. |
| Cookie | String or Uint8Array |
Not supported. | Browser only. |
| Node.js Filesystem | Uint8Array |
Supported. | Node.js only. |
| Bun Filesystem | Uint8Array |
Supported. | Bun only. |
| S3 Node.js | Uint8Array |
Supported. | Node.js. Requires an external service. |
| S3 Bun | Uint8Array |
Supported. | Bun only. Requires an external service. |
| Redis Node.js | Uint8Array |
Supported. | Node.js. Requires an external service. |
| Redis Bun | Uint8Array |
Supported. | Bun only. Requires an external service. |
| Valkey | Uint8Array |
Supported. | Node.js. Requires an external service. |
| Memcached | Uint8Array |
Not supported. | No restrictions. Requires an external server. |
| etcd | Uint8Array |
Supported. | No restrictions. Requires an external server. |
| Cloudflare Cache | Uint8Array |
Supported. | Cloudflare Workers only. |
| Cloudflare KV | Uint8Array |
Not supported. | Cloudflare Workers only. |
| Cloudflare R2 | Uint8Array |
Supported. | Cloudflare Workers only. |
| Vercel Blob | Uint8Array |
Supported. Joined on write. | No restrictions. Requires a token. |
| Vercel Runtime Cache | Arbitrary values | Supported. | Assumes the Vercel runtime. |
| Retry | Depends on wrapped backend | Depends on wrapped backend. | No restrictions. |
| Soft Delete | Depends on wrapped backend | Depends on wrapped backend. | No restrictions. |