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

Feature: Ability to configure (or reconfigure) a SizedCache size based on runtime data #180

Open
hcldan opened this issue Feb 19, 2024 · 4 comments

Comments

@hcldan
Copy link

hcldan commented Feb 19, 2024

For instance, after reading a config file.

Or an admin wanting to tweak the size of the cache without restart.

@omid
Copy link
Contributor

omid commented Feb 22, 2024

You mean a default config for all sized caches or define size by an env var, like size = my_fn_size?

@jaemk
Copy link
Owner

jaemk commented Feb 22, 2024

You can access the backing cache store at any time, it's named after the function name by default (FN_WRAPPED_WITH_CACHE). What needs to be added is a method on the sized cache store that lets you modify the cache size

@hcldan
Copy link
Author

hcldan commented Mar 5, 2024

Yes, a method to resize the cache would be great.

It would also be nice if I could specify it from a value that I would read from config on startup.

@hcldan
Copy link
Author

hcldan commented Mar 5, 2024

You mean a default config for all sized caches or define size by an env var, like size = my_fn_size?

No, each cache would likely have its own needs.

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