File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -258,6 +258,12 @@ This package can be used as a Cache Components handler (Node.js runtime) for Nex
258258
259259### Enable Cache Components + cache handler
260260
261+ Install the package in your Next.js app:
262+
263+ ``` bash
264+ pnpm add @trieb.work/nextjs-turbo-redis-cache redis
265+ ```
266+
261267In your Next.js app, enable Cache Components and point ` cacheHandlers.default ` to a module that exports the handler instance:
262268
263269``` ts
@@ -281,6 +287,15 @@ const { redisCacheHandler } = require('@trieb.work/nextjs-turbo-redis-cache');
281287module .exports = redisCacheHandler;
282288```
283289
290+ If you prefer ESM:
291+
292+ ``` js
293+ // cache-handler.js
294+ import { redisCacheHandler } from ' @trieb.work/nextjs-turbo-redis-cache' ;
295+
296+ export default redisCacheHandler ;
297+ ```
298+
284299### Required environment variables
285300
286301- ` REDIS_URL ` (recommended): e.g. ` redis://localhost:6379 `
You can’t perform that action at this time.
0 commit comments