-
Notifications
You must be signed in to change notification settings - Fork 32
feat: Added caching for OptimizelyConfig object #352
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
Conversation
Pull Request Test Coverage Report for Build 1332
💛 - Coveralls |
e648907
to
4e9aba8
Compare
…ments in unit test
83e89f6
to
ce9d305
Compare
core-api/src/main/java/com/optimizely/ab/config/PollingProjectConfigManager.java
Outdated
Show resolved
Hide resolved
core-api/src/test/java/com/optimizely/ab/config/PollingProjectConfigManagerTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one request. Let's add the OptimizelyConfigManager
to the constructor as a @Nullable
parameter and handle the default from the builder. I prefer to keep the constructor devoid of business logic.
Summary
Updated the
OptimizelyConfig
implementation to always return cached object.OptimizelyConfig
object will only be updated only when newProjectConfig
is received.Test Plan
Added Unit tests