Skip to content

Support fetch cache option #1050

Open
Open
@guybedford

Description

@guybedford

We could support the specified cache option for fetch with the following:

  • 'default': This is our default so we exactly match the spec here
  • 'no-store': This is the same as CacheOverride: pass so we can fully support this
  • 'reload': Bypasses a cache check (so always goes to backend), then updates the cache - not possible, would require supporting insert without a successful transaction lookup
  • 'no-cache': Always revalidates to the backend - same as above
  • 'force-cache': Requires cache lookup ignoring staleness - not possible, but might make sense to support even if not properly implemented, since it’s kinda unobservable
  • 'only-if-cached': As above

We should likely:

  • Throw for 'reload' and 'no-cache'
  • Support 'force-cache' and 'only-if-cached' with types / documentation warnings

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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