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 @@ -259,6 +259,12 @@ This package can be used as a Cache Components handler (Node.js runtime) for Nex
259259
260260### Enable Cache Components + cache handler
261261
262+ Install the package in your Next.js app:
263+
264+ ``` bash
265+ pnpm add @trieb.work/nextjs-turbo-redis-cache redis
266+ ```
267+
262268In your Next.js app, enable Cache Components and point ` cacheHandlers.default ` to a module that exports the handler instance:
263269
264270``` ts
@@ -282,6 +288,15 @@ const { redisCacheHandler } = require('@trieb.work/nextjs-turbo-redis-cache');
282288module .exports = redisCacheHandler;
283289```
284290
291+ If you prefer ESM:
292+
293+ ``` js
294+ // cache-handler.js
295+ import { redisCacheHandler } from ' @trieb.work/nextjs-turbo-redis-cache' ;
296+
297+ export default redisCacheHandler ;
298+ ```
299+
285300### Required environment variables
286301
287302- ` REDIS_URL ` (recommended): e.g. ` redis://localhost:6379 `
You can’t perform that action at this time.
0 commit comments