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

Ability to manually clear in-memory cache #243

Open
aaricpittman opened this issue Dec 28, 2023 · 2 comments
Open

Ability to manually clear in-memory cache #243

aaricpittman opened this issue Dec 28, 2023 · 2 comments

Comments

@aaricpittman
Copy link

aaricpittman commented Dec 28, 2023

Is your feature request related to a problem? Please describe.

When in ldd mode, I would like to be able to manually clear the in-memory cache rather than wait for the expiration.

Describe the solution you'd like

The ability to call client.clear_cache or store.clear_cache or something to that effect which would ultimately call LaunchDarkly::ExpiringCache#clear.

Describe alternatives you've considered

Given the encapsulation of the cache, the only option currently seems to be to close the current client and initialize a new one.

@keelerm84
Copy link
Member

Good morning and thank you for reaching out.

There has some been discussion recently about the behavior of the in memory cache within the SDKs. Would you mind telling me a bit more about your use case so we can capture that need in future discussions?

@aaricpittman
Copy link
Author

Sure,

The client used by our Rails app is instantiated with use_ldd: true. We have code in our app that was intended to clear the in-memory cache. There was some confusion and it was believed that it could be cleared calling flush on the client. While looking into another issue I realized that flush wasn't clearing the cache as originally thought and was looking for a way to actually clear it without extending SDK.

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