Skip to content

Graphorin API reference v0.15.1


Graphorin API reference / @graphorin/store-sqlite / / IdempotencyStore

Interface: IdempotencyStore ​

Defined in: packages/store-sqlite/src/idempotency-store.ts:31

Stable

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.

Methods ​

delete() ​

ts
delete(key): Promise<void>;

Defined in: packages/store-sqlite/src/idempotency-store.ts:34

Parameters ​

ParameterType
keystring

Returns ​

Promise&lt;void&gt;


get() ​

ts
get(key): Promise<
  | IdempotencyRecord
| null>;

Defined in: packages/store-sqlite/src/idempotency-store.ts:33

Parameters ​

ParameterType
keystring

Returns ​

Promise< | IdempotencyRecord | null>


prune() ​

ts
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.

Parameters ​

ParameterType
olderThannumber

Returns ​

Promise&lt;number&gt;


put() ​

ts
put(record): Promise<void>;

Defined in: packages/store-sqlite/src/idempotency-store.ts:32

Parameters ​

ParameterType
recordIdempotencyRecord

Returns ​

Promise&lt;void&gt;