Skip to content
Français

TaskCacheStore

import type { TaskCacheStore } from "@elie-laloum/outpost";
  • readRequired
    (fingerprint: string, options?: TaskCacheAccessOptions) => Promise<TaskCacheEntry | undefined>
    Return the valid entry stored for a fingerprint, or undefined when none exists. The workflow validates the entry again and treats errors as a miss.
  • writeRequired
    (entry: TaskCacheEntry, options?: TaskCacheAccessOptions) => Promise<void>
    Persist an entry for its fingerprint, replacing an older one; a failure is reported as a failed cache event without changing the task outcome.
export interface TaskCacheStore {
  read(
    fingerprint: string,
    options?: TaskCacheAccessOptions,
  ): Promise<TaskCacheEntry | undefined>;
  write(entry: TaskCacheEntry, options?: TaskCacheAccessOptions): Promise<void>;
}