Skip to content

API reference > @kontsedal/olas-persist > PersistQueryCacheOptions

PersistQueryCacheOptions type ​

Options for persistQueryCachePlugin and restoreQueryCache.

Signature:

typescript
type PersistQueryCacheOptions = {
  storage?: StorageAdapter;
  key?: string;
  buster?: string;
  maxAgeMs?: number;
  throttleMs?: number;
  include?: (query: QueryRef) => boolean;
  restore?: boolean;
  onError?: (error: unknown, op: QueryCacheErrorOp) => void;
};

References: StorageAdapter, QueryRef, QueryCacheErrorOp

Released under the MIT License.