Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Cached::cache_try_get_or_set_with #224

Merged
merged 1 commit into from
Nov 6, 2024
Merged

add Cached::cache_try_get_or_set_with #224

merged 1 commit into from
Nov 6, 2024

Conversation

wbenny
Copy link
Contributor

@wbenny wbenny commented Sep 8, 2024

This commit adds a new trait method Cached::cache_try_get_or_set_with and implements it for all cache variants in the code.

This method was already available for async, but there was no way how to do the same in the sync code.

Each module follows slightly different coding styles, so I tried to match a coding style for each particular module.

Tests were extended for every implementation (mostly inspired by their already existing async counterparts).

@wbenny
Copy link
Contributor Author

wbenny commented Nov 1, 2024

Hi, can I do something to help push this though? I would really love to ditch my fork from Cargo.toml :)

@wbenny wbenny closed this Nov 5, 2024
@jaemk jaemk reopened this Nov 5, 2024
@jaemk
Copy link
Owner

jaemk commented Nov 5, 2024

Sorry I've been absent @wbenny. Assuming the tests pass, PR looks good and I can push a new version

@jaemk jaemk merged commit 6e8ad31 into jaemk:master Nov 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants