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

max memory limit #77

Closed
antonioaltamura opened this issue Sep 15, 2016 · 2 comments
Closed

max memory limit #77

antonioaltamura opened this issue Sep 15, 2016 · 2 comments

Comments

@antonioaltamura
Copy link

Hi, what do you think about add this feature?
I mean just a simple way to control the cache grown.

@ptarjan
Copy link
Owner

ptarjan commented Nov 1, 2016

This library isn't for volatile caches. If it was I would have written it in a way where every key knew how to populate itself and would just use the cache when RAM was available. Instead it is very much for persistant on-box caching.

If you are worried about memory limits, I'd recommend using performance.memory in Chrome and then doing things that are specific to your application on how to limit memory growth.

@ptarjan ptarjan closed this as completed Nov 1, 2016
@antonioaltamura
Copy link
Author

antonioaltamura commented Nov 1, 2016

don't you think an unlimited hashmap growth may be also a security flaw?
What's happen if I intentionally make thousands of different requests and let the hashmap grows in the order of magnitude of hundreds of MB in little time?

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 a pull request may close this issue.

2 participants