Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reactivate reactive variables when InMemoryCache acquires first watcher. #7657

Merged
merged 3 commits into from
Feb 5, 2021

Commits on Feb 4, 2021

  1. Reactivate reactive variables when InMemoryCache gets new watchers.

    Fixes a bug introduced by #7279, which was triggered by calling
    this.cancel() before re-watching in the QueryInfo#updateWatch method,
    causing cache.watches.size to drop to zero temporarily, thereby invoking
    forgetCache(cache). When this happened, reactive variables would stop
    broadcasting updates to the forgotten cache, even though the unwatching
    was only momentary, and would not begin broadcasting again until the
    association was reestablished by other means.
    
    This new implementation uses a WeakMap to remember the association between
    caches and sets of reactive variables, which makes it possible to recall
    those associations later, provided the cache has not been garbage
    collected in the meantime.
    benjamn committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    a47a4a4 View commit details
    Browse the repository at this point in the history
  2. Mention PR #7657 in CHANGELOG.md.

    benjamn committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    8b248ab View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2021

  1. Regression test for PR #7657.

    benjamn committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    bc47b93 View commit details
    Browse the repository at this point in the history