From eff9aaaa6b95b9c19e52b15bf63b339523e8b435 Mon Sep 17 00:00:00 2001 From: Quinn Slack Date: Mon, 25 Dec 2023 01:21:09 -0600 Subject: [PATCH] wip --- provider/docs/src/corpus/cache/cache.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/provider/docs/src/corpus/cache/cache.ts b/provider/docs/src/corpus/cache/cache.ts index ab14a4d8..3936849a 100644 --- a/provider/docs/src/corpus/cache/cache.ts +++ b/provider/docs/src/corpus/cache/cache.ts @@ -29,6 +29,12 @@ export function scopedCache(cache: CorpusCache, 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(cache: CorpusCache, text: string, key: string, fn: () => Promise): Promise export async function memo( cache: CorpusCache,