@@ -109,8 +109,7 @@ A Redis-based handler for key- and tag-based caching. Compared to the original i
109109- Default ` revalidateTagQuerySize ` : ` 10_000 ` (safe for large caches)
110110
111111``` js
112- const createRedisHandler =
113- require (" @neshca/cache-handler/redis-strings" ).default ;
112+ import createRedisHandler from " @fortedigital/nextjs-cache-handler/redis-strings" ;
114113
115114const redisHandler = await createRedisHandler ({
116115 client,
@@ -136,10 +135,9 @@ The local-lru Handler uses a lru-cache ↗ instance as the cache store. It store
136135- Default ` revalidateTagQuerySize ` : ` 10_000 ` (safe for large caches)
137136
138137``` js
139- const createLocalLruHandler =
140- require (" @neshca/cache-handler/local-lru" ).default ;
138+ import createLruHandler from " @fortedigital/nextjs-cache-handler/local-lru" ;
141139
142- const localHandler = createLocalLruHandler ({
140+ const localHandler = createLruHandler ({
143141 maxItemsNumber: 10000 ,
144142 maxItemSizeBytes: 1024 * 1024 * 500 ,
145143});
@@ -158,8 +156,7 @@ Routes cache operations across multiple underlying handlers.
158156- First-available read strategy
159157
160158``` js
161- const createCompositeHandler =
162- require (" @neshca/cache-handler/composite" ).default ;
159+ import createCompositeHandler from " @fortedigital/nextjs-cache-handler/composite" ;
163160
164161const compositeHandler = createCompositeHandler ({
165162 handlers: [handler1, handler2],
@@ -183,11 +180,9 @@ Next 15 decided to change types of some properties from String to Buffer which c
183180 See: https://github.com/vercel/next.js/blob/f5444a16ec2ef7b82d30048890b613aa3865c1f1/packages/next/src/server/response-cache/types.ts#L80
184181
185182` ` ` js
186- const createBufferStringDecoratorHandler =
187- require (" @neshca/cache-handler/composite" ).default ;
183+ import createBufferStringDecoratorHandler from " @fortedigital/nextjs-cache-handler/buffer-string-decorator" ;
188184
189- const bufferStringDecorator =
190- createBufferStringDecoratorHandler (redisCacheHandler);
185+ const bufferStringDecorator = createBufferStringDecoratorHandler (redisCacheHandler);
191186` ` `
192187
193188## Examples
0 commit comments