@stacksjs/cache 0.56.34 → 0.57.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/drivers/dynamodb.d.ts +1 -0
- package/dist/drivers/dynamodb.mjs +1 -0
- package/dist/drivers/index.d.ts +4 -0
- package/dist/drivers/index.mjs +4 -0
- package/dist/drivers/memcached.d.ts +1 -0
- package/dist/drivers/memcached.mjs +1 -0
- package/dist/drivers/redis.d.ts +9 -0
- package/dist/{shared/cache.643bd2b7.mjs → drivers/redis.mjs} +3 -16
- package/dist/drivers/upstash.d.ts +1 -0
- package/dist/drivers/upstash.mjs +1 -0
- package/dist/index.d.ts +1 -5
- package/dist/index.mjs +1 -6
- package/package.json +3 -19
- package/dist/dynamodb.d.ts +0 -6
- package/dist/dynamodb.mjs +0 -5
- package/dist/memcached.d.ts +0 -6
- package/dist/memcached.mjs +0 -5
- package/dist/redis-af20e529.d.ts +0 -30
- package/dist/redis.d.ts +0 -2
- package/dist/redis.mjs +0 -3
- package/dist/upstash.d.ts +0 -6
- package/dist/upstash.mjs +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RedisClientType } from 'redis';
|
|
2
|
+
declare const client: RedisClientType;
|
|
3
|
+
declare function set(key: string, value: any): Promise<void>;
|
|
4
|
+
declare function get(key: string): Promise<any>;
|
|
5
|
+
declare function remove(key: string): Promise<void>;
|
|
6
|
+
declare function del(key: string): Promise<void>;
|
|
7
|
+
declare function flushAll(): Promise<void>;
|
|
8
|
+
declare function flushDB(): Promise<void>;
|
|
9
|
+
export { set, get, remove, del, flushAll, flushDB, client };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { createClient } from
|
|
2
|
-
import { cache } from
|
|
3
|
-
|
|
1
|
+
import { createClient } from "redis";
|
|
2
|
+
import { cache } from "@stacksjs/config";
|
|
4
3
|
const client = createClient({
|
|
5
4
|
socket: {
|
|
6
5
|
host: cache.drivers?.redis?.host,
|
|
@@ -27,16 +26,4 @@ async function flushAll() {
|
|
|
27
26
|
async function flushDB() {
|
|
28
27
|
await client.sendCommand(["FLUSHDB", "ASYNC"]);
|
|
29
28
|
}
|
|
30
|
-
|
|
31
|
-
const redis = {
|
|
32
|
-
__proto__: null,
|
|
33
|
-
client: client,
|
|
34
|
-
del: del,
|
|
35
|
-
flushAll: flushAll,
|
|
36
|
-
flushDB: flushDB,
|
|
37
|
-
get: get,
|
|
38
|
-
remove: remove,
|
|
39
|
-
set: set
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export { remove as a, flushDB as b, client as c, del as d, flushAll as f, get as g, redis as r, set as s };
|
|
29
|
+
export { set, get, remove, del, flushAll, flushDB, client };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { m as memcached } from './memcached.mjs';
|
|
3
|
-
export { d as dynamodb } from './dynamodb.mjs';
|
|
4
|
-
export { u as upstash } from './upstash.mjs';
|
|
5
|
-
import 'redis';
|
|
6
|
-
import '@stacksjs/config';
|
|
1
|
+
export * from "./drivers/index.mjs";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/cache",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.57.2",
|
|
5
5
|
"packageManager": "pnpm@8.6.5",
|
|
6
6
|
"description": "The Stacks way of caching.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
@@ -30,22 +30,6 @@
|
|
|
30
30
|
".": {
|
|
31
31
|
"types": "./dist/index.d.ts",
|
|
32
32
|
"import": "./dist/index.mjs"
|
|
33
|
-
},
|
|
34
|
-
"./dynamodb": {
|
|
35
|
-
"types": "./dist/dynamodb.d.ts",
|
|
36
|
-
"import": "./dist/dynamodb.mjs"
|
|
37
|
-
},
|
|
38
|
-
"./memcached": {
|
|
39
|
-
"types": "./dist/dynamodb.d.ts",
|
|
40
|
-
"import": "./dist/dynamodb.mjs"
|
|
41
|
-
},
|
|
42
|
-
"./redis": {
|
|
43
|
-
"types": "./dist/dynamodb.d.ts",
|
|
44
|
-
"import": "./dist/dynamodb.mjs"
|
|
45
|
-
},
|
|
46
|
-
"./upstash": {
|
|
47
|
-
"types": "./dist/dynamodb.d.ts",
|
|
48
|
-
"import": "./dist/dynamodb.mjs"
|
|
49
33
|
}
|
|
50
34
|
},
|
|
51
35
|
"module": "dist/index.mjs",
|
|
@@ -63,10 +47,10 @@
|
|
|
63
47
|
"memcached": "^2.2.2",
|
|
64
48
|
"memjs": "^1.3.1",
|
|
65
49
|
"redis": "^4.6.7",
|
|
66
|
-
"@stacksjs/config": "0.
|
|
50
|
+
"@stacksjs/config": "0.57.2"
|
|
67
51
|
},
|
|
68
52
|
"devDependencies": {
|
|
69
|
-
"@stacksjs/development": "0.
|
|
53
|
+
"@stacksjs/development": "0.57.2"
|
|
70
54
|
},
|
|
71
55
|
"scripts": {
|
|
72
56
|
"build": "unbuild",
|
package/dist/dynamodb.d.ts
DELETED
package/dist/dynamodb.mjs
DELETED
package/dist/memcached.d.ts
DELETED
package/dist/memcached.mjs
DELETED
package/dist/redis-af20e529.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { RedisClientType } from 'redis';
|
|
2
|
-
|
|
3
|
-
declare const client: RedisClientType;
|
|
4
|
-
declare function set(key: string, value: any): Promise<void>;
|
|
5
|
-
declare function get(key: string): Promise<any>;
|
|
6
|
-
declare function remove(key: string): Promise<void>;
|
|
7
|
-
declare function del(key: string): Promise<void>;
|
|
8
|
-
declare function flushAll(): Promise<void>;
|
|
9
|
-
declare function flushDB(): Promise<void>;
|
|
10
|
-
|
|
11
|
-
declare const redis_client: typeof client;
|
|
12
|
-
declare const redis_del: typeof del;
|
|
13
|
-
declare const redis_flushAll: typeof flushAll;
|
|
14
|
-
declare const redis_flushDB: typeof flushDB;
|
|
15
|
-
declare const redis_get: typeof get;
|
|
16
|
-
declare const redis_remove: typeof remove;
|
|
17
|
-
declare const redis_set: typeof set;
|
|
18
|
-
declare namespace redis {
|
|
19
|
-
export {
|
|
20
|
-
redis_client as client,
|
|
21
|
-
redis_del as del,
|
|
22
|
-
redis_flushAll as flushAll,
|
|
23
|
-
redis_flushDB as flushDB,
|
|
24
|
-
redis_get as get,
|
|
25
|
-
redis_remove as remove,
|
|
26
|
-
redis_set as set,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { remove as a, flushDB as b, client as c, del as d, flushAll as f, get as g, redis as r, set as s };
|
package/dist/redis.d.ts
DELETED
package/dist/redis.mjs
DELETED
package/dist/upstash.d.ts
DELETED