Graphorin API reference v0.7.0
Graphorin API reference / @graphorin/store-sqlite / / IdempotencyStore
Interface: IdempotencyStore
Defined in: packages/store-sqlite/src/idempotency-store.ts:31
Pluggable idempotency cache. The @graphorin/server package (Phase 14) consumes this surface; the schema itself ships in Phase 05's migration 008 so the framework only owns one set of SQL tables.
Stable
Methods
delete()
delete(key): Promise<void>;Defined in: packages/store-sqlite/src/idempotency-store.ts:34
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
Promise<void>
get()
get(key): Promise<
| IdempotencyRecord
| null>;Defined in: packages/store-sqlite/src/idempotency-store.ts:33
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
Promise< | IdempotencyRecord | null>
prune()
prune(olderThan): Promise<number>;Defined in: packages/store-sqlite/src/idempotency-store.ts:41
Delete records whose expiry is older than the supplied epoch-ms instant. Production caller: the server's hourly scheduleIdempotencyPruning sweep (started by app-lifecycle), so expired rows no longer accumulate forever (W-065).
Parameters
| Parameter | Type |
|---|---|
olderThan | number |
Returns
Promise<number>
put()
put(record): Promise<void>;Defined in: packages/store-sqlite/src/idempotency-store.ts:32
Parameters
| Parameter | Type |
|---|---|
record | IdempotencyRecord |
Returns
Promise<void>