Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

db.ts

18 lines348 Bytes

1import Dexie from 'dexie'
2​
3import type { EntityTable } from 'dexie'
4​
5// Dexie database for RSC payload caching
6export interface RscCacheEntry {
7 id: string
8 payload: string
9 createdAt: number
11​
12export const db = new Dexie('RscCache') as Dexie & {
13 cache: EntityTable<RscCacheEntry, 'id'>
15​
16db.version(1).stores({
17 cache: 'id, createdAt',
18})