We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7707986 commit 1811022Copy full SHA for 1811022
packages/shared/sdk-server-edge/src/api/cache.ts
@@ -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
+ */
8
export default interface Cache {
9
+ /**
10
+ * Get a value from the cache. Returning `undefined` means the key was not found.
11
12
get(key: string): any;
13
+
14
15
+ * Set a value in the cache.
16
17
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
23
close(): void;
24
}
0 commit comments