FF
FeatureFlare docs
Guides and API reference
API reference

FeatureFlarePersistentCacheAdapter

Persistent cache adapter contract for browser storage.

Current section
Component and config reference
Use these pages when you need props, defaults, and provider behavior details.

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

save(envKey: string, snapshot: FeatureFlarePersistentSnapshot)

Persists the latest environment snapshot after refresh or realtime updates.

Related docs