@spoosh/plugin-gc 0.1.0-beta.0 → 0.1.2
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/dist/index.d.mts +10 -7
- package/dist/index.d.ts +10 -7
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -35,13 +35,16 @@ type GcPluginExports = {
|
|
|
35
35
|
*
|
|
36
36
|
* @example
|
|
37
37
|
* ```ts
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
38
|
+
* import { Spoosh } from "@spoosh/core";
|
|
39
|
+
*
|
|
40
|
+
* const client = new Spoosh<ApiSchema, Error>("/api")
|
|
41
|
+
* .use([
|
|
42
|
+
* gcPlugin({
|
|
43
|
+
* maxAge: 60000, // Remove entries older than 1 minute
|
|
44
|
+
* maxEntries: 100, // Keep max 100 entries
|
|
45
|
+
* interval: 30000, // Run GC every 30 seconds
|
|
46
|
+
* }),
|
|
47
|
+
* ]);
|
|
45
48
|
*
|
|
46
49
|
* // Manual GC trigger
|
|
47
50
|
* const { runGc } = createReactSpoosh(client);
|
package/dist/index.d.ts
CHANGED
|
@@ -35,13 +35,16 @@ type GcPluginExports = {
|
|
|
35
35
|
*
|
|
36
36
|
* @example
|
|
37
37
|
* ```ts
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
38
|
+
* import { Spoosh } from "@spoosh/core";
|
|
39
|
+
*
|
|
40
|
+
* const client = new Spoosh<ApiSchema, Error>("/api")
|
|
41
|
+
* .use([
|
|
42
|
+
* gcPlugin({
|
|
43
|
+
* maxAge: 60000, // Remove entries older than 1 minute
|
|
44
|
+
* maxEntries: 100, // Keep max 100 entries
|
|
45
|
+
* interval: 30000, // Run GC every 30 seconds
|
|
46
|
+
* }),
|
|
47
|
+
* ]);
|
|
45
48
|
*
|
|
46
49
|
* // Manual GC trigger
|
|
47
50
|
* const { runGc } = createReactSpoosh(client);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spoosh/plugin-gc",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Garbage collection plugin for Spoosh cache with time and size-based cleanup",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@spoosh/core": ">=0.
|
|
37
|
+
"@spoosh/core": ">=0.3.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@spoosh/core": "0.
|
|
41
|
-
"@spoosh/test-utils": "0.1.
|
|
40
|
+
"@spoosh/core": "0.3.0",
|
|
41
|
+
"@spoosh/test-utils": "0.1.3"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"dev": "tsup --watch",
|