Skip to content

Allow automatic re-fetching of common requests #10

Description

@ianmacartney

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

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

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