Skip to content

withCache can send stale data #52

@benweitzman

Description

@benweitzman
  1. Create an underlying observable
  2. Wrap using withCache
  3. Attach an observer to the cached observable
  4. Send a value (A) through the underlying observable
  5. Unobserve from the cached observable
  6. Send another value (B) through the underlying
  7. Attach a new observer to the cached observable
  8. New observer receives (A) immediately, despite A being a stale value.

This issue is made worse for observers like toPromise which will unobserved after receiving their first value, meaning they only ever receive a stale value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions