Paywall View Cache
Cache for paywall, loading, and shimmer views.
State is owned by a SequentialActor — every mutation is enqueued through a single FIFO consumer, so state.value always reflects the latest committed data and there are no races between save/get, remove/save, or concurrent acquire calls. ViewStorage is kept as a write-through mirror because external readers (SuperwallPaywallActivity, DebugView) read it directly. Every write must go through this cache (save, storeView, removeView, ...) so the two never disagree about which keys exist.
Constructors
Properties
Functions
Synchronous because PaywallView.present is non-suspend.
Fire-and-forget dispatch of a sub-action on this context's actor.
Synchronous counterpart of storeView.
Stores a view under an arbitrary key (activity launch and restore keys, debug views). Synchronous because callers hand key to an Activity that reads ViewStorage as soon as it is created. Both writes are atomic map operations, so no queued action is needed for consistency.
Apply a state reducer inline.