Skip to content

Navigation Menu

Sign in
Sign up

best_before = None triggers function call everytime #11

Open

Description

#10 makes is_stale default to True when best_before is None. This prompts a function call every time someone calls the function.

IMO, this should not be the default behaviour, but rather an explicit choice.

A different approach would be exposing is_stale instead of best_before and letting users decide how it will be implemented (and not forcing the usage of timestamp, for example.).
Or making a best_before = infinite as default.

Ultimately, it is a decision for the maintainer @ecarrara.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      AltStyle によって変換されたページ (->オリジナル) /