@commandkit/redis 0.1.1-dev.20250411164425 → 0.1.1-dev.20250417143530

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.
Files changed (2) hide show
  1. package/README.md +19 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -31,4 +31,23 @@ async function getCachedData() {
31
31
 
32
32
  return data;
33
33
  }
34
+ ```
35
+
36
+ ## Manual configuration
37
+
38
+ If you want to configure the Redis client manually, you can do so by not registering this plugin and instead updating the cache provider at runtime:
39
+
40
+ ```ts
41
+ import { onApplicationBootstrap } from 'commandkit';
42
+ import { RedisCacheProvider } from '@commandkit/redis';
43
+ import { Redis } from 'ioredis';
44
+
45
+ // configure the redis client as needed
46
+ const redis = new Redis();
47
+
48
+ onApplicationBootstrap(async (commandkit) => {
49
+ const redisProvider = new RedisCacheProvider(redis);
50
+
51
+ commandkit.setCacheProvider(redisProvider)
52
+ })
34
53
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commandkit/redis",
3
- "version": "0.1.1-dev.20250411164425",
3
+ "version": "0.1.1-dev.20250417143530",
4
4
  "description": "Redis cache provider for CommandKit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",