Conversation
|
@cursor review |
431fce0 to
816c470
Compare
|
@launchdarkly/js-sdk-common size report |
|
@launchdarkly/browser size report |
|
@launchdarkly/js-client-sdk-common size report |
816c470 to
6124cc1
Compare
|
@launchdarkly/js-client-sdk size report |
| * | ||
| * @defaultValue false | ||
| */ | ||
| disableCache?: boolean; |
There was a problem hiding this comment.
We may want to separate this one out for a feature release?
There was a problem hiding this comment.
You could put:
BEGIN_COMMIT_OVERRIDE
fix: Max cached context enforcement wasn't working for 0.
feat: Add explicit disableCache setting.
END_COMMIT_OVERRIDE
There was a problem hiding this comment.
We will probably want to use the disable cache setting in gonfalon as well.
Requirements
Related issues
sdk-2023
Describe the solution you've provided
disableCacheoptionNote
Medium Risk
Changes persistent flag caching behavior (read/write and eviction) and introduces a new
disableCacheoption, which can affect offline fallback/initialization latency if misconfigured. Logic is covered by new unit tests but touches core persistence paths.Overview
Fixes persistent flag caching so it can be explicitly disabled via a new
disableCacheoption (plumbed throughLDOptions→Configuration→LDClientImpl→DefaultFlagManager→FlagPersistence) and validated in configuration parsing.Updates
FlagPersistenceto skip all cache reads/writes whendisableCacheis true ormaxCachedContexts <= 0, while still pruning/clearing previously cached entries and ensuring pruned contexts (including equal-timestamp edge cases) are not re-written. Adds targeted tests coveringmaxCachedContexts=0,disableCache=true, and pruning behavior.Written by Cursor Bugbot for commit 431fce0. This will update automatically on new commits. Configure here.