Skip to content
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

size and memsize gives always 0 result #105

Open
Xgamefactory opened this issue Jul 26, 2018 · 1 comment
Open

size and memsize gives always 0 result #105

Xgamefactory opened this issue Jul 26, 2018 · 1 comment

Comments

@Xgamefactory
Copy link

Xgamefactory commented Jul 26, 2018

we have check cached data exists after put but keys returns empty result
also size and memsize is zero always

require("memory-cache").size() => 0
require("memory-cache").memsize() => 0

require("memory-cache").keys() empty array

@annibuliful
Copy link

require("memory-cache").size() always 0 because It's call module which is not stored into a variable

https://github.com/ptarjan/node-cache/blob/master/index.js#L102

You can see this function which returns the size of the cache

https://github.com/ptarjan/node-cache/blob/master/index.js#L25

Whenever you call put() to store your data into cache, the size is increased.

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

No branches or pull requests

2 participants