KV
Sub-ms latencyGlobal key-value store
Global edge key-value storage with sub-millisecond latency. Full command support including strings, hashes, lists, sets, and sorted sets. Built-in TTL, atomic operations, and rate limiting primitives. Data automatically namespaced per app.
Overview
Pricing
Usage
Docs
Examples
Cache Datakv.ts
typescript
import { sylphx } from '@sylphx/sdk'
// Set with 1 hour TTL
await sylphx.kv.set('user:123:profile', userData, { ex: 3600 })
// Get cached data
const profile = await sylphx.kv.get('user:123:profile')Rate Limitingratelimit.ts
typescript
const { success, remaining, reset } = await sylphx.kv.ratelimit({
key: `api:${userId}`,
limit: 100,
window: '1h',
})
if (!success) {
throw new Error('Rate limit exceeded')
}Atomic Countercounter.ts
typescript
// Increment page views atomically
const views = await sylphx.kv.incr('page:home:views')
// Decrement inventory
const stock = await sylphx.kv.incr('product:123:stock', { by: -1 })Looking for more examples?
View on GitHub