Skip to content

Client Side Caching #2947

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 19, 2025
Merged

Client Side Caching #2947

merged 9 commits into from
May 19, 2025

Conversation

bobymicroby
Copy link
Member

@bobymicroby bobymicroby commented May 7, 2025

@bobymicroby bobymicroby changed the title csc-sjpotter Client Side Caching May 7, 2025
@bobymicroby bobymicroby force-pushed the csc-sjpotter branch 7 times, most recently from 778c629 to 7fd7686 Compare May 9, 2025 08:27
@bobymicroby bobymicroby requested a review from htemelski May 9, 2025 08:28
@bobymicroby bobymicroby force-pushed the csc-sjpotter branch 4 times, most recently from 334bb72 to 92c900b Compare May 12, 2025 06:39
Comment on lines 351 to 341
recordEvictions(count: number): void {
this.#evictionCount++;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this increment by count?

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.
@bobymicroby bobymicroby merged commit f01f101 into redis:master May 19, 2025
11 checks passed
@elena-kolevska
Copy link

Hey @andy-stark-redis, we have client-side caching in node-redis now. Bobi included some useful docs you can use.

@andy-stark-redis
Copy link

@elena-kolevska Hi! Yeah, I've been following this PR and I've already started the docs for CSC. I'll let Bobi know when the docs PR is ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants