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

InMemoryCacheClient Maximum Size #264

Open
Terebi42 opened this issue Aug 25, 2021 · 5 comments
Open

InMemoryCacheClient Maximum Size #264

Terebi42 opened this issue Aug 25, 2021 · 5 comments

Comments

@Terebi42
Copy link

In addition to being able to limit the total number of items, it would be nice to be able to limit the size, so that items could be removed due to memory pressure.

@niemyjski
Copy link
Member

I'm not sure how you would efficiently get the objects size without a big hit to performance. Have you played around with this any? Typically we know the objects going into cache and can reason about size / maximum items we want to persist.

@Terebi42
Copy link
Author

Well, you serialize everything you are putting into the cache aren't you? Wouldn't that let you know the size?

@ejsmith
Copy link
Contributor

ejsmith commented Aug 26, 2021

@Terebi42 for the in memory cache, it's an option on whether or not you want to serialize things when adding them to the cache.

@Terebi42
Copy link
Author

Well, then maybe the maximum size feature would only work when serialization is on?

@ejsmith
Copy link
Contributor

ejsmith commented Aug 26, 2021

Yeah, that's a possibility. Would you want to submit a PR for this feature?

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

3 participants