As a part of stabilizing the cache API, the following cache methods have been renamed:
get_or_insert_with(K, F) → get_with(K, F)
get_or_try_insert_with(K, F) → try_get_with(K, F)
Old methods are still available but marked as deprecated. They will be removed in a
future version.
Also policy method was added to all caches and blocking method was added to
future::Cache. They return a Policy struct or BlockingOp struct
respectively. Some uncommon cache methods were moved to these structs, and old
methods were removed without deprecating.
Please see #105[gh-pull-0105] for the complete list of the renamed and moved methods.
Changed
API stabilization. (Smaller core cache API, shorter names for common methods)
(#105[gh-pull-0105])
Performance related:
Improve performance of get_with and try_get_with. (#88[gh-pull-0088])
Avoid to calculate the same hash twice in get, get_with, insert,
invalidate, etc. (#90[gh-pull-0090])
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps moka from 0.7.2 to 0.8.0.
Changelog
Sourced from moka's changelog.
Commits
5015431
Merge pull request #105 from moka-rs/api-change1fd4a7a2
Brush up the doc fordash::Cache
9cc04c5
API stabilization: Addblock
method tofuture::Cache
3ca3928
API stabilization: Addblock
method tofuture::Cache
dd4e627
Fix a typo38ab703
API stabilization: Addblock
method tofuture::Cache
babde05
Renameget_if_present
method ofdash::Cache
toget
707f5a6
Update the CHANGELOG and README for v0.8.099268b3
API stabilization: Prefer shorter name for common methods, and addfec6dff
Merge pull request #91 from moka-rs/better-cht-integrationDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)