1
0
mirror of https://github.com/redis/node-redis.git synced 2025-07-31 05:44:24 +03:00
Commit Graph

2146 Commits

Author SHA1 Message Date
d0a5c4c945 Fix sentinel csc tests (#2966)
Co-authored-by: H. Temelski <hristo.temelski@redis.com>
2025-05-20 11:04:11 +03:00
f01f1014cb Client Side Caching (#2947)
* CSC POC ontop of Parser

* add csc file that weren't merged after patch

* address review comments

* nits to try and fix github

* last change from review

* Update client-side cache and improve documentation

* Add client side caching RESP3 validation

* Add documentation for RESP and unstableResp3 options

* Add comprehensive cache statistics

The `CacheStats` class provides detailed metrics like hit/miss counts,
load success/failure counts, total load time, and eviction counts.
It also offers derived metrics such as hit/miss rates, load failure rate,
and average load penalty. The design is inspired by Caffeine.

`BasicClientSideCache` now uses a `StatsCounter` to accumulate these
statistics, exposed via a new `stats()` method. The previous
`cacheHits()` and `cacheMisses()` methods have been removed.

A `recordStats` option (default: true) in `ClientSideCacheConfig`
allows disabling statistics collection.

---------

Co-authored-by: Shaya Potter <shaya@redislabs.com>
2025-05-19 15:11:47 +03:00
6f961bd715 fix(client): cache subsequent clients (#2963)
* fix(client): cache subsequent clients

we dont need to recreate a client if
its config hasnt changed

fixes #2954

* handle circular structures

* make cache generic
2025-05-14 17:23:22 +03:00
ebd03036d6 revert the 'total' count logic in AGGREGATE response introduced in #2952 (#2955)
> FT.AGGREGATE returns an array reply where each row is an array reply and represents a single aggregate result.
The integer reply at position 1 does not represent a valid value.

https://redis.io/docs/latest/commands/ft.aggregate/#return
2025-05-09 10:13:32 +03:00
5e9fea1fd3 Update Redis version to 8.0.1-pre (#2952)
> FT.AGGREGATE returns an array reply where each row is an array reply
and represents a single aggregate result.
> The integer reply at position 1 does not represent a valid value.

We now calculate the result length bazed on the number of results
instead of the integer reply at pos 1
2025-05-08 15:14:30 +03:00
bb7845dfe3 Disable readOnly for cluster s/pubsub client (#2950) 2025-05-08 10:29:05 +03:00
86480aaa74 fix cluster.sUnsubscribe - make listener optional (#2946) 2025-05-07 16:11:09 +03:00
73d7ae71cc update package-lock.json (#2943) 2025-05-07 16:10:50 +03:00
7b737821b2 fix: fix various command import issues (#2944)
* fix: fix various command import issues

there was some sort of a circular dependency
in <module>/lib/commands/index.ts for various modules

fixes #2937 fixes #2941

* remove redundant definition
2025-05-07 16:10:35 +03:00
bc4b2101ee Export CommandParser from client index file and fix doc (#2945)
* Export CommandParser from client index file

* Tidy up long export line in client index file

Wrap and sort entries.

* Adapt and fix wrong examples in programmability doc
2025-05-07 16:10:03 +03:00
87b77e3e5f fix(client): add type annotations (#2949)
Fix type parameter for transformTuplesReply in CONFIG_GET and HGETALL commands

fixes #2933
2025-05-07 13:47:23 +03:00
52e5562356 Release redis@5.0.1 redis@5.0.1 2025-05-05 12:28:40 +03:00
fd069641f3 Updated the Redis package to use client@5.0.1 2025-05-05 12:21:02 +03:00
71ab009ef8 Release time-series@5.0.1 time-series@5.0.1 2025-05-05 12:03:48 +03:00
1e976d24cc Updated the Timeseries package to use client@5.0.1 2025-05-05 12:03:17 +03:00
17179ddb35 Release search@5.0.1 search@5.0.1 2025-05-05 12:02:20 +03:00
cc13ae298e Updated the Search package to use client@5.0.1 2025-05-05 12:01:39 +03:00
e99cd073b6 Release json@5.0.1 json@5.0.1 2025-05-05 12:00:46 +03:00
84680d6e5a Updated the Json package to use client@5.0.1 2025-05-05 12:00:10 +03:00
67cde227cc Release entraid@5.0.1 entraid@5.0.1 2025-05-05 11:59:07 +03:00
57e5daab98 Updated the Entraid package to use client@5.0.1 2025-05-05 11:58:23 +03:00
6714ad109d Release bloom@5.0.1 bloom@5.0.1 2025-05-05 11:57:11 +03:00
2c9faad2d9 Updated the Bloom package to use client@5.0.1 2025-05-05 11:55:40 +03:00
404db30837 Release client@5.0.1 client@5.0.1 2025-05-05 11:51:15 +03:00
f6912b03da Update packages/redis/README.md (#2935)
* copy root readme into redis readme

* fix links

* update supported versions

* update supported versions
2025-05-05 11:38:51 +03:00
2c9ad2e772 chore(examples): fix examples for v5 (#2938) 2025-05-05 11:35:41 +03:00
bd5c230c62 fix: update package-lock.json (#2939) 2025-05-05 11:29:59 +03:00
bab1211ad4 Updated CHANGELOG.md, fix typo(s) (#2861) 2025-05-03 16:34:15 +03:00
964b8de06d docs: clarify connection pooling in createClient and fix broken link in isolationPoolOptions (#2896)
- Added a Connection Pooling section in `createClient` documentation to clarify that a single connection is typically sufficient and to provide guidance on when to use a connection pool.
- Updated `isolationPoolOptions` description with a more precise explanation and replaced the broken link with a reference to `createClientPool`.
- Changes made based on issue #2845.
2025-05-03 16:32:56 +03:00
47e297077a Release redis@5.0.0 redis@5.0.0 2025-04-30 17:20:34 +03:00
1daf0f02da Updated the Redis package to use client@5.0.0 2025-04-30 17:17:15 +03:00
16fb7e02da Release time-series@5.0.0 time-series@5.0.0 2025-04-30 17:15:15 +03:00
912e0d8170 Updated the Timeseries package to use client@5.0.0 2025-04-30 17:14:39 +03:00
30cecc4b48 Release search@5.0.0 search@5.0.0 2025-04-30 17:13:28 +03:00
c942f0eb9f Updated the Search package to use client@5.0.0 2025-04-30 17:12:59 +03:00
b7147911de Release json@5.0.0 json@5.0.0 2025-04-30 17:07:55 +03:00
7359617047 Updated the Json package to use client@5.0.0 2025-04-30 17:06:44 +03:00
99003307f9 Release entraid@5.0.0 entraid@5.0.0 2025-04-30 17:05:46 +03:00
42911295a4 Updated the Entraid package to use client@5.0.0 2025-04-30 17:05:10 +03:00
bd10c92348 Release bloom@5.0.0 bloom@5.0.0 2025-04-30 17:04:03 +03:00
091244a32a Updated the Bloom package to use client@5.0.0 2025-04-30 17:00:26 +03:00
bf2b3752d6 Release client@5.0.0 client@5.0.0 2025-04-30 16:56:53 +03:00
4022e6947d update package-lock.json (#2932) 2025-04-30 16:50:35 +03:00
46bfeaa94e Fix typo and improve Sentinel docs (#2931) 2025-04-30 16:30:16 +03:00
49d6b2d465 Update README.MD (#2924)
* Update README.MD

* docs: update programmability.md examples

+ add Programmability section to README and

* fix imports according to the new v5 exports

* more v5 docs updates

---------

Co-authored-by: Nikolay Karadzhov <nkaradzhov89@gmail.com>
2025-04-30 16:28:22 +03:00
9459660d96 fix(pubsub): Fixed cluster client pubsub logic
* Infer the cluster pubsub client read only mode from the node type

* Modify flag logic
2025-04-30 15:57:01 +03:00
10ff6debab fix(sentinel): Migrated to the new testing framework, fixed issues that were discovered during transition
* [CAE-342] Fix a couple of bugs

* Fixed issue with nodes masterauth persistency, changed docker container

* [CAE-342] Fixed a couple of sentinel issues, enabled most tests

* [CAE-342] Added comment

* [CAE-342] Migrate majority of tests to testUtils

* [CAE-342] Minor refactor

* .

* [CAE-342] Using cae containers for sentinel

* [CAE-342] Improved resiliency of the legacy tests, added TSdoc comment

* [CAE-342] Some extra logging, removed unneeded changes

* [CAE-342] Moved docker env as optional part of redisserverdockerconfig

* [CAE-342] Move password to serverArguments

* [CAE-342] Moved ts-node to devDependencies

* [CAE-342] Reverted legacy testing framework improvements
2025-04-30 15:56:29 +03:00
048df302e4 Fix imports (#2929)
* fix: exports

align exports with v4 as much as possible

* document breaking changes

* export type

return SetOptions export
2025-04-30 14:38:32 +03:00
5295926cc0 bump test container to 8.0-RC2-pre (#2927) 2025-04-29 10:56:38 +03:00
4d659f0b44 docs: update the default credential provider example (#2919) 2025-04-07 15:29:13 +03:00