Skip to content

Commit 1811022

Browse files
committed
Add doc
1 parent 7707986 commit 1811022

File tree

1 file changed

+19
-0
lines changed
  • packages/shared/sdk-server-edge/src/api

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1+
/**
2+
* General-purpose cache interface.
3+
*
4+
* This is used by the SDK to cache feature flags and other data. The SDK does
5+
* not assume any particular implementation of the cache, so you can provide
6+
* your own.
7+
*/
18
export default interface Cache {
9+
/**
10+
* Get a value from the cache. Returning `undefined` means the key was not found.
11+
*/
212
get(key: string): any;
13+
14+
/**
15+
* Set a value in the cache.
16+
*/
317
set(key: string, value: any): void;
18+
19+
/**
20+
* The close method offers a way to clean up any resources used by the cache
21+
* on shutdown.
22+
*/
423
close(): void;
524
}

0 commit comments

Comments
 (0)