@frontmcp/plugin-cache 1.9.1 → 1.9.3
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/esm/index.mjs +265 -294
- package/esm/package.json +3 -3
- package/index.js +265 -294
- package/package.json +3 -3
- package/providers/cache-vercel-kv.provider.d.ts +8 -2
- package/providers/cache-vercel-kv.provider.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontmcp/plugin-cache",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.3",
|
|
4
4
|
"description": "Cache plugin for FrontMCP - Redis, Vercel KV, and in-memory caching with automatic tool result caching",
|
|
5
5
|
"author": "AgentFront <info@agentfront.dev>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@frontmcp/sdk": "1.9.
|
|
52
|
-
"@frontmcp/utils": "1.9.
|
|
51
|
+
"@frontmcp/sdk": "1.9.3",
|
|
52
|
+
"@frontmcp/utils": "1.9.3",
|
|
53
53
|
"ioredis": "^5.8.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CacheStoreInterface } from '../cache.types';
|
|
1
|
+
import { type CacheStoreInterface } from '../cache.types';
|
|
2
2
|
export interface CacheVercelKvProviderOptions {
|
|
3
3
|
url?: string;
|
|
4
4
|
token?: string;
|
|
@@ -6,10 +6,16 @@ export interface CacheVercelKvProviderOptions {
|
|
|
6
6
|
defaultTTL?: number;
|
|
7
7
|
}
|
|
8
8
|
export default class CacheVercelKvProvider implements CacheStoreInterface {
|
|
9
|
-
private
|
|
9
|
+
private readonly connection;
|
|
10
|
+
private client?;
|
|
10
11
|
private readonly keyPrefix;
|
|
11
12
|
private readonly defaultTTL;
|
|
12
13
|
constructor(options?: CacheVercelKvProviderOptions);
|
|
14
|
+
/**
|
|
15
|
+
* The client, built on first use from the url and token (or KV_REST_API_URL / KV_REST_API_TOKEN)
|
|
16
|
+
* by the shared loader, which a Cloudflare Worker can bundle (#711). A failed attempt is retried.
|
|
17
|
+
*/
|
|
18
|
+
private kv;
|
|
13
19
|
private prefixKey;
|
|
14
20
|
/** Set a value (auto-stringifies objects) */
|
|
15
21
|
setValue(key: string, value: unknown, ttlSeconds?: number): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache-vercel-kv.provider.d.ts","sourceRoot":"","sources":["../../src/providers/cache-vercel-kv.provider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cache-vercel-kv.provider.d.ts","sourceRoot":"","sources":["../../src/providers/cache-vercel-kv.provider.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,MAAM,WAAW,4BAA4B;IAC3C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAeD,MAAM,CAAC,OAAO,OAAO,qBAAsB,YAAW,mBAAmB;IACvE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAqB;IAChD,OAAO,CAAC,MAAM,CAAC,CAA0B;IACzC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;gBAExB,OAAO,GAAE,4BAAiC;IAgBtD;;;OAGG;IACH,OAAO,CAAC,EAAE;IAQV,OAAO,CAAC,SAAS;IAIjB,6CAA6C;IACvC,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAY/E,2DAA2D;IACrD,QAAQ,CAAC,CAAC,GAAG,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAiBlF,mBAAmB;IACb,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxC,4BAA4B;IACtB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK3C,+EAA+E;IACzE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B"}
|