-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
When working with batches, some caches could support batch get/set/delete operations. It would probably save bandwidth / time when cachified would support these operations and fall back to parallel single operations when not supported by the cache.
export interface Cache {
name?: string;
get: (key: string) => Eventually<CacheEntry<unknown>>;
set: (key: string, value: CacheEntry<unknown>) => unknown | Promise<unknown>;
delete: (key: string) => unknown | Promise<unknown>;
batch?: {
get: (keys: string[]) => Eventually<CacheEntry<unknown>[]>;
set: (entries: { key: string, value: CacheEntry<unknown> }[]) => unknown | Promise<unknown>;
delete: (keys: string[]) => unknown | Promise<unknown>;
}
}swalker326, v-anton, hilja, mario-jerkovic and a-eid
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed