mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 10:10:30 +08:00
Format *.ts, *.js, *.css, *.html, *.json and *.svelte
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@ import LruCache from "lru-cache";
|
||||
export function cached<Args extends unknown[], V>(
|
||||
f: (...args: Args) => Promise<V>,
|
||||
makeKey: (...args: Args) => string,
|
||||
options?: LruCache.Options<string, { value: V }>
|
||||
options?: LruCache.Options<string, { value: V }>,
|
||||
): (...args: Args) => Promise<V> {
|
||||
const cache = new LruCache(options || { max: 500 });
|
||||
return async function (...args: Args): Promise<V> {
|
||||
|
||||
Reference in New Issue
Block a user