From b2a4a08956e5d03c2046b39df8ea306cd10309d3 Mon Sep 17 00:00:00 2001 From: mahdavipanah Date: Tue, 10 Dec 2024 18:07:08 +0300 Subject: [PATCH] docs(README.md): improve --- README.md | 6 ++---- package.json | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f0cec8d..c38b9ac 100644 --- a/README.md +++ b/README.md @@ -161,21 +161,19 @@ Creates a new `KeyvUpstash` instance. - **set(key, value, ttl?)**: Set a value in the cache. - **get(key)**: Get a value from the cache. - **delete(key)**: Delete a key from the cache. -- **clear()**: Clear all keys in the cache (subject to namespaces). +- **clear()**: Clear all keys in the namespace. If the namespace is not set it will clear all keys that are not prefixed with a namespace unless `noNamespaceAffectsAll` is set to `true`. - **setMany(entries)**: Set multiple values in the cache. - **getMany(keys)**: Get multiple values from the cache. - **deleteMany(keys)**: Delete multiple keys from the cache. - **has(key)**: Check if a key exists in the cache. - **hasMany(keys)**: Check if multiple keys exist in the cache. -- **iterator(namespace?)**: Get an async iterator over keys and values. +- **iterator(namespace?)**: Create a new iterator for the keys. If the namespace is not set it will iterate over all keys that are not prefixed with a namespace unless `noNamespaceAffectsAll` is set to `true`. ## Differences from @keyv/redis - **Backend**: Uses [Upstash Redis](https://upstash.com/), an HTTP-based, serverless Redis service. - **Connection**: Requires Upstash REST API URL and token instead of a traditional Redis connection URL. -- **Cluster Support**: Upstash Redis does not support Redis Clustering. - **TLS and Sockets**: Connection options related to sockets and TLS are not applicable. -- **Automatic Serialization**: The `automaticDeserialization` option is set to `false` by default to prevent issues with special value types. - **Compatibility**: Aims to be compatible with `@keyv/redis` where possible, but some differences exist due to the nature of Upstash Redis. ## License diff --git a/package.json b/package.json index a8a3fd4..77b9bb4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "keyv-upstash", - "version": "1.0.5", + "version": "1.0.6", "description": "Upstash Redis adapter for Keyv", "type": "module", "main": "dist/index.cjs",