@tramvai/tokens-common 2.160.19 → 2.160.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cache.d.ts +9 -1
- package/package.json +5 -6
package/lib/cache.d.ts
CHANGED
|
@@ -24,10 +24,18 @@ export declare const CLEAR_CACHE_TOKEN: ((type?: string) => Promise<void>) & {
|
|
|
24
24
|
};
|
|
25
25
|
export interface Cache<T = any> {
|
|
26
26
|
get(key: string): T | undefined;
|
|
27
|
-
set(key: string, value: T
|
|
27
|
+
set(key: string, value: T, options?: {
|
|
28
|
+
ttl?: number;
|
|
29
|
+
}): void;
|
|
28
30
|
has(key: string): boolean;
|
|
29
31
|
delete(key: string): boolean;
|
|
30
32
|
clear(): void;
|
|
33
|
+
dump(): Array<[string, {
|
|
34
|
+
value: T;
|
|
35
|
+
}]>;
|
|
36
|
+
load(arr: Array<[string, {
|
|
37
|
+
value: T;
|
|
38
|
+
}]>): void;
|
|
31
39
|
}
|
|
32
40
|
export type CacheType = 'memory' | 'memory-lfu';
|
|
33
41
|
export interface CacheOptionsByType<T> {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/tokens-common",
|
|
3
|
-
"version": "2.160.
|
|
3
|
+
"version": "2.160.21",
|
|
4
4
|
"description": "Tramvai tokens for @tramvai/module-common",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.es.js",
|
|
@@ -18,16 +18,15 @@
|
|
|
18
18
|
"watch": "tsc -w"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@tinkoff/lru-cache-nano": "^7.
|
|
21
|
+
"@tinkoff/lru-cache-nano": "^7.9.0",
|
|
22
22
|
"@tinkoff/url": "0.8.6",
|
|
23
|
-
"@tramvai/react": "2.160.
|
|
24
|
-
"@tramvai/tokens-core": "2.160.
|
|
25
|
-
"node-abort-controller": "^3.0.1"
|
|
23
|
+
"@tramvai/react": "2.160.21",
|
|
24
|
+
"@tramvai/tokens-core": "2.160.21"
|
|
26
25
|
},
|
|
27
26
|
"peerDependencies": {
|
|
28
27
|
"@tinkoff/dippy": "0.8.16",
|
|
29
28
|
"@tinkoff/logger": "0.10.67",
|
|
30
|
-
"@tramvai/types-actions-state-context": "2.160.
|
|
29
|
+
"@tramvai/types-actions-state-context": "2.160.21",
|
|
31
30
|
"react": ">=16.8",
|
|
32
31
|
"tslib": "^2.4.0"
|
|
33
32
|
},
|