Overview
The SDK loses all cached state on page reload, causing redundant RPC calls on navigation. Add opt-in sessionStorage persistence so cached data survives page refreshes within the same browser tab.
Acceptance Criteria
StellarSplitSDK({ cache: { persist: 'session' } }) option enables sessionStorage persistence
- On init, SDK hydrates its in-memory cache from sessionStorage entries that are not yet expired
- On cache write, entry is also written to sessionStorage with expiry timestamp
- On cache evict/invalidate, entry is removed from sessionStorage
- Storage key prefix:
split-sdk-cache: to avoid collisions
- Graceful degradation: if sessionStorage is unavailable (private browsing quota), falls back to memory-only silently
sdk.clearPersistedCache() wipes all split-sdk-cache: keys from sessionStorage
- Does not persist in Node.js environments (sessionStorage unavailable — silently skipped)
Overview
The SDK loses all cached state on page reload, causing redundant RPC calls on navigation. Add opt-in sessionStorage persistence so cached data survives page refreshes within the same browser tab.
Acceptance Criteria
StellarSplitSDK({ cache: { persist: 'session' } })option enables sessionStorage persistencesplit-sdk-cache:to avoid collisionssdk.clearPersistedCache()wipes allsplit-sdk-cache:keys from sessionStorage