Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
sqs committed Dec 25, 2023
1 parent 753eeb9 commit eff9aaa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions provider/docs/src/corpus/cache/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ export function scopedCache<T>(cache: CorpusCache<unknown>, scope: string): Corp
}
}

/**
* Memoize an operation using the cache.
*
* The alternate form with `toJSONValue` and `fromJSONValue` is for when the value is not directly
* JSON-serializable, such as `Float32Array`.
*/
export async function memo<T>(cache: CorpusCache<unknown>, text: string, key: string, fn: () => Promise<T>): Promise<T>
export async function memo<T>(
cache: CorpusCache<unknown>,
Expand Down

0 comments on commit eff9aaa

Please sign in to comment.