You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add option to control initial emission in publishers
Introduce a new parameter `emitInitial` to control whether the current value is emitted immediately upon subscription to publishers in MemoryBox, HybridBox, and UserDefaultsBox.
- Updated all cache box implementations (`PandoraMemoryBox`, `PandoraHybridBox`, `PandoraUserDefaultsBox`) to support the `emitInitial` parameter in their `publisher` methods.
- By default, `emitInitial` is set to `true`, maintaining existing behavior.
- Introduced comprehensive unit tests to verify the functionality for both `emitInitial: true` and `emitInitial: false` cases.
- Updated documentation to reflect the new parameter in all relevant protocols and methods.
This change allows users to subscribe to cache updates without receiving the current value, which can be advantageous in scenarios where only future changes are relevant. The default behavior remains unchanged to ensure backward compatibility.
0 commit comments