-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Client Side Caching #2947
Conversation
778c629
to
7fd7686
Compare
334bb72
to
92c900b
Compare
packages/client/lib/client/cache.ts
Outdated
recordEvictions(count: number): void { | ||
this.#evictionCount++; | ||
} |
There was a problem hiding this comment.
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.
Hey @andy-stark-redis, we have client-side caching in node-redis now. Bobi included some useful docs you can use. |
@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. |
Uh oh!
There was an error while loading. Please reload this page.