Skip to content

Allow me to control the cache time based on the fresh value #25

Closed
@kentcdodds

Description

@kentcdodds

Related to my use case in #24, if the user has a gravatar, then I'm happy to let that cache hang around for days. If they don't then I want to refresh it every 20 seconds. Maybe the ttl could accept a function which passes the current value if it's available and undefined if not?

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