FeatureFlarePersistentCacheAdapter
Storage adapter contract for persisting SDK flag snapshots across browser sessions.
More on this: see FeatureFlareReactConfig for the config field that accepts this adapter.
export type FeatureFlarePersistentCacheAdapter = {
load: (envKey: string) => Promise<FeatureFlarePersistentSnapshot | null> | FeatureFlarePersistentSnapshot | null;
save: (envKey: string, snapshot: FeatureFlarePersistentSnapshot) => Promise<void> | void;
};Methods
load(envKey: string)
Returns the stored FeatureFlarePersistentSnapshot for an environment, or null when no persisted state exists.
save(envKey: string, snapshot: FeatureFlarePersistentSnapshot)
Persists the latest environment snapshot after refresh or realtime updates.
Related docs
- FeatureFlarePersistentSnapshot for the snapshot object that this adapter stores.
- FeatureFlareReactConfig for the config field that accepts this adapter.