Add a crate feature sync
for enabling and disabling sync
caches
#143
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a crate feature
sync
for enabling and disablingsync
caches (sync::Cache
andsync::SegmentedCache
). When enabled,sync
caches will be available for use. This feature is enabled by default.The
sync
feature will be especially useful when you use experimentaldash::Cache
because now you can opt out some dependencies such ascrossbeam-epoch
anduuid
by disabling bothsync
andfuture
features.Usage
Changes
New crate feature
sync
:sync
feature and make it enabled by default.sync
caches.sync
feature.future::Cache
changes:future::Cache
has been changed fromsync::Iter
tofuture::Iter
.future::Cache::invalidate_entries_if
method has been changed fromResult<sync::PredicateId, _>
toResult<future::PredicateId, _>
.Note that this PR will be merged into the
next
branch for Moka v0.9.0 release. (Currently, themaster
branch is for Moka v0.8.x releases)Fixes #140