redis 5.0.1 → 5.1.0

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 (3) hide show
  1. package/README.md +17 -0
  2. package/dist/index.d.ts +274 -274
  3. package/package.json +6 -6
package/README.md CHANGED
@@ -234,6 +234,23 @@ of sending a `QUIT` command to the server, the client can simply close the netwo
234
234
  ```typescript
235
235
  client.destroy();
236
236
  ```
237
+ ### Client Side Caching
238
+
239
+ Node Redis v5 adds support for [Client Side Caching](https://redis.io/docs/manual/client-side-caching/), which enables clients to cache query results locally. The Redis server will notify the client when cached results are no longer valid.
240
+
241
+ ```typescript
242
+ // Enable client side caching with RESP3
243
+ const client = createClient({
244
+ RESP: 3,
245
+ clientSideCache: {
246
+ ttl: 0, // Time-to-live (0 = no expiration)
247
+ maxEntries: 0, // Maximum entries (0 = unlimited)
248
+ evictPolicy: "LRU" // Eviction policy: "LRU" or "FIFO"
249
+ }
250
+ });
251
+ ```
252
+
253
+ See the [V5 documentation](../../docs/v5.md#client-side-caching) for more details and advanced usage.
237
254
 
238
255
  ### Auto-Pipelining
239
256