get-convex / get-convex/action-cache

Allow automatic re-fetching of common requests

Open
#10 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.