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

Add an optional param to provide assignmentCache solution; fallback t… #61

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pavelflux
Copy link
Collaborator

…o LRU

Fixes: #issue

Motivation and Context

Description

How has this been tested?

@@ -61,6 +67,8 @@ export interface IClientConfig {
* Poll for new configurations even if the initial configuration request failed. (default: false)
*/
pollAfterFailedInitialization?: boolean;

disablePolling?: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider passing a persistentStore instead which implements isExpired the way you want it:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I think we want to do what Leo said and then expose pollAfterSuccessfulInitialization to prevent polling.

@@ -61,6 +67,8 @@ export interface IClientConfig {
* Poll for new configurations even if the initial configuration request failed. (default: false)
*/
pollAfterFailedInitialization?: boolean;

disablePolling?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, I think we want to do what Leo said and then expose pollAfterSuccessfulInitialization to prevent polling.

/**
* (optional) Provide your own caching solution. If not defined, LRU cache will be used.
*/
assignmentCache?: AssignmentCache<Cacheable>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like being able to pass in the assignment cache 👍

The Vercel implementation will use their edge file

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 this pull request may close these issues.

None yet

3 participants