From 7ab6f77dcf744572121492556b6d20d7a812753f Mon Sep 17 00:00:00 2001
From: documentation-bot QUIT
command to the server, the client can simply clos
client.destroy()
.
client.destroy();
+Node Redis v5 adds support for 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.
+// Enable client side caching with RESP3
const client = createClient({
RESP: 3,
clientSideCache: {
ttl: 0, // Time-to-live (0 = no expiration)
maxEntries: 0, // Maximum entries (0 = unlimited)
evictPolicy: "LRU" // Eviction policy: "LRU" or "FIFO"
}
});
+
+See the V5 documentation for more details and advanced usage.
Node Redis will automatically pipeline requests that are made during the same "tick".
client.set("Tm9kZSBSZWRpcw==", "users:1");
client.sAdd("users:1:tokens", "Tm9kZSBSZWRpcw==");
@@ -214,4 +218,4 @@ an error
occurs, that error will be thrown and the Node.js process
Thank you to all the people who already contributed to Node Redis!
This repository is licensed under the "MIT" license. See LICENSE.
-Generated using TypeDoc