Created
August 26, 2020 18:08
-
-
Save ccapndave/5c3d02f0da951b6cb4892217ee5dc151 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function makeCache<Key, Value, ValueMap extends Map<string, Value>>( | |
hashKey: (key: Key) => string, | |
valueCodec: Codec<Value>, | |
fetchValueMap: (keys: readonly Key[]) => EitherAsync<string, ValueMap>, | |
ttl: number | |
{ | |
// ValueMap is used here lots too | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment