Skip to content

Commit 7bcf098

Browse files
authored
Update README.md
1 parent ae57ee8 commit 7bcf098

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
![NPM Version](https://img.shields.io/npm/v/%40fortedigital%2Fnextjs-cache-handler)
2+
13
# @fortedigital/nextjs-cache-handler
24

35
This package extends the functionality of [`@neshca/cache-handler`](https://www.npmjs.com/package/@neshca/cache-handler) by providing additional cache handlers for specialized use cases, specifically for Redis-based caching solutions. The original `@neshca/cache-handler` offers a robust caching API for Next.js applications, and this package introduces two new handlers for managing Redis cache with different expiration strategies and tag-based revalidation.
@@ -10,13 +12,13 @@ To install this package along with its dependencies:
1012
npm install @fortedigital/nextjs-cache-handler
1113
```
1214

13-
Ensure that you have already set up `@neshca/cache-handler` before integrating these extended handlers.
15+
Package depends on the original `@neshca/cache-handler` package - you can use anything provided by it by using import/require from `@neshca/cache-handler`.
1416

1517
## Handlers
1618

1719
### 1. `redis-strings`
1820

19-
This handler is designed to manage cache operations using Redis strings. It supports key-based and tag-based caching with flexible expiration strategies.
21+
This handler is designed to manage cache operations using Redis strings. It supports key-based and tag-based caching with flexible expiration strategies. Opposite to `@neshca/cache-handler`, `@fortedigital/nextjs-cache-handler`'s implementation does not have a memory leak caused by endlessly growing shared key hashmap, by adding another hashmap with TTL for shared keys entries. It also has more reliable revalidateTagQuerySize default value - 10_000 - preventing long tag revalidatation requests with large caches.
2022

2123
#### Features:
2224

0 commit comments

Comments
 (0)