Skip to content

fetch requests #216

@ronag

Description

@ronag

Love the addition of fetch! Some feedback.

AbortSignal

Would be nice if it supported AbortSignal.

fetchMethod(key, staleValue, { signal })
cache.fetch(key, { signal })

A little unsure about he exact semantics. But e.g. during "dispose" the signal sent to the fetch method should IMO be signalled.

So there are two things:

  • AbortSignal for fetchMethod so that it can be cancelled during cleanup/purge/prune/dispose
  • AbortSignal for fetch so that the user can cancel the promise (whether this actually cancels the background fetch is something to consider)

TTL

Would be nice if the fetchMethod could somehow signal the ttl for the retrieved value (e.g. for a dns cache).

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