-
Notifications
You must be signed in to change notification settings - Fork 366
fetch requests #216
Copy link
Copy link
Closed
Description
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).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels