Skip to content

Cache rework #41

Description

@kesne

Right now the cache is global, which works well, and even works for when providers change. However, this doesn't make a lot of sense long-term, because it causes unbounded cache growth, and resetting the provider doesn't actually free any memory.

I think there's a couple ways to solve this:

  • Cache object is provided by the provider itself. This should help clean up memory when providers are reset / removed.
  • Cache is a user-configurable LRU cache, with the ability to explicitly retain data that is actively being used.
  • Hooks cause data being used to be explicitly retained (need to figure out how this works with suspense and concurrent).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions