Skip to content

Conversation

@Borda
Copy link
Contributor

@Borda Borda commented Feb 16, 2024

While Working on the package, I found the default challenging to follow... I go that package want to have one global setting but as dist it hard to trace and eventually help with refactor by any IDE, so using dataclass would be better.

Also, for user, I think using default directly with the cashier would be much better, see additional suggestion

def cachier(
    hash_func: _Type_HashFunc = _default_hash_func,
    hash_params: Optional[_Type_HashFunc] = None,
    backend: _Type_Backend = "pickle",
    mongetter: Optional[_Type_Mongetter] = None,
    stale_after: datetime.timedelta = datetime.timedelta.max,
    next_time: bool = False,
    cache_dir: Union[str, os.PathLike] = "~/.cachier/",
    pickle_reload: bool = True,
    separate_files: bool = False,
    wait_for_calc_timeout: int = 0,
    allow_none: bool = False,
):
    ...

@Borda
Copy link
Contributor Author

Borda commented Feb 19, 2024

@shaypal5 mind checking it again? 🦩

Copy link
Member

@shaypal5 shaypal5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work, man! Thank you for your contribution!

@shaypal5 shaypal5 merged commit 35a0064 into master Feb 19, 2024
@shaypal5 shaypal5 deleted the refactor/defaults branch February 19, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants