get-convex / get-convex/action-cache
Allow automatic re-fetching of common requests
Open
- Dominant language
- TypeScript
- Stars
- 15
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
I think it would be a great feature to enable auto re-caching on a schedule - so clients almost always get a cache hit.
Something like
```ts
cache.fetch(..., { automaticallyRefetchUntil: Date.now() + 30 * DAYS });
```
That would call it with the same arguments a ~minute before it expires until the specified date - so you get cache hits without infinitely re-fetching
Inspired by #6
Contributor guide
Assessment
This issue has not been assessed yet.