-
Notifications
You must be signed in to change notification settings - Fork 139
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
Flush stats #158
Comments
You can use |
I’m looking to flush just the stats and not the entire cache. This is useful for sending metrics to a data pipeline.
… On Nov 25, 2019, at 20:18, Sujesh Thekkepatt ***@***.***> wrote:
You can use myCache.getStats() for getting info on cache. To flush all data you can use myCache.flushAll().
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I think there is no method for just flushing stats. |
@melissafzhang hey and welcome here :) Do I understand this correctly: We do not expose such a function for now, but you can (for the time being) use this hack: cache.stats = {
hits: 0,
misses: 0,
keys: 0,
ksize: 0,
vsize: 0,
} |
@erdii are you working on this? If not I can take it upon. |
@sujeshthekkepatt that would be nice! :) |
Cool. I will work on it. :). Please do assign me on the issue :) |
Currently no method to flush the stats. Flushing stats helpful for metrics analysis. See more node-cache#158
#161 has landed! thanks to @sujeshthekkepatt for the implementation and @melissafzhang for the idea Edit: published in v5.0.2 |
Is there a way to flush stats? I would like to see how many cache hits/misses there are in a given time period. Thanks!
The text was updated successfully, but these errors were encountered: