@flightdev/cache-deno-kv
v0.0.7
Published
Deno KV cache adapter for Flight Framework - native Deno key-value store
Readme
@flightdev/cache-deno-kv
Deno KV cache adapter for Flight Framework. Native Deno KV storage for edge and serverless.
Installation
import { denoKV } from '@flightdev/cache-deno-kv';Quick Start
import { createCache } from '@flightdev/core/cache';
import { denoKV } from '@flightdev/cache-deno-kv';
const cache = createCache(denoKV());
await cache.set('key', 'value');
const value = await cache.get('key');Configuration
denoKV({
// Key prefix
prefix: ['cache'],
// Default TTL in milliseconds
ttl: 60 * 60 * 1000,
// Custom KV instance (optional, uses Deno.openKv() by default)
kv: await Deno.openKv('./data.db'),
});Features
- Zero dependencies
- ACID transactions
- Native Deno Deploy support
- Automatic serialization
License
MIT
