Update Rust crate moka to 0.12.7 - autoclosed #175
Closed
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.
This PR contains the following updates:
0.12
->0.12.7
Release Notes
moka-rs/moka (moka)
v0.12.7
Compare Source
Changed
run_pending_tasks
to evict as many entries as possiblefrom the cache ([#417][gh-pull-0417]).
v0.12.6
Compare Source
Fixed
future::Cache
that pendingrun_pending_tasks
calls may causeinfinite busy loop in an internal
schedule_write_op
method([#412][gh-issue-0412]):
v0.12.0
when the background threads were removedfrom
future::Cache
.run_pending_task
method is called by user code whilecache is receiving a very high number of concurrent cache write operations.
(e.g.
insert
,get_with
,invalidate
etc.)schedule_write_op
method will be spinning in a busy loopforever, causing high CPU usage and all other async tasks to be starved.
Changed
async-lock
crate used byfuture::Cache
fromv2.4
to the latestv3.3
.v0.12.5
Compare Source
Added
([#390][gh-pull-0390]):
eviction_policy
method of the cachebuilder with a policy obtained by
EvictionPolicy::lru
function.as it maintains better hit rate than LRU for most use cases. TinyLFU combines
LRU eviction policy and popularity-based admission policy. A probabilistic data
structure is used to estimate historical popularity of both hit and missed
keys. (not only the keys currently in the cache.)
recency biased workload such as streaming data processing. LRU policy can be
used for them to achieve better hit rate.
Window-TinyLFU in the future. It will adjust the balance between recency and
frequency based on the current workload.
v0.12.4
Compare Source
Fixed
crossbeam-epoch
to run GC when dropping a cache ([#384][gh-pull-0384]):crossbeam-epoch
crate provides an epoch-based memory reclamation scheme forconcurrent data structures. It is used by Moka cache to safely drop cached
entries while they are still being accessed by other threads.
crossbeam-epoch
does its best to reclaim memory (drop the entries evictedfrom the cache) when the epoch is advanced. However, it does not guarantee that
memory will be reclaimed immediately after the epoch is advanced. This means
that entries can remain in the memory for a while after the cache is dropped.
crossbeam-epoch
's thread local buffers are flushed, helping to reclaim memoryimmediately.
while after a cache is dropped. We are looking for alternatives to
crossbeam-epoch
to improve this situation (e.g. [#385][gh-issue-0385]).Added
([#382][gh-pull-0382])
v0.12.3
Compare Source
Added
([#370][gh-pull-0370]):
entry
andentry_by_ref
APIs have the following methods:and_upsert_with
method to insert or update the entry.and_compute_with
method to insert, update, remove or do nothing on theentry.
and_try_compute_with
method, which is similar to above but returnsResult
.Fixed
quanta
from>=0.11.0, <0.12.0
to>=0.12.2, <0.13.0
to avoid under-measuring the elapsed time on Apple siliconMacs ([#376][gh-pull-0376]).
later than expected.
v0.12.2
Compare Source
Fixed
internal data structures ([#348][gh-pull-0348]):
when the cache is full and a second time when there is a room in the cache.
call (which is wrong), and the
entry_count
method will keep returning a nonzero value after calling the
invalidate_all
method (which is also wrong).is read ([#363][gh-pull-0363]):
is used to determine if the entry has been expired.
when pending tasks were processed. This delay caused issue that some entries
become temporarily unavailable for reads even though they have been accessed
recently. And then they will become available again after the pending tasks are
processed.
entry will remain valid until the time-to-idle has elapsed.
Note that both of [#348][gh-pull-0348] and [#363][gh-pull-0363] were already present
in
v0.11.x
and older versions. However they were less likely to occur because theyhad background threads to periodically process pending tasks. So there were much
shorter time windows for these issues to occur.
Changed
[@nyurik][gh-nyurik])
([#340][gh-pull-0340], by [@nyurik][gh-nyurik])
Added
[@peter-scholtens][gh-peter-scholtens])
v0.12.1
Compare Source
Fixed
future::Cache
that occurred whenget_with()
,entry().or_insert_with()
, and similar methods were used ([#329][gh-issue-0329]).v0.12.0
. Versions prior tov0.12.0
do nothave this bug.
Changed
ValueInitializer
([#331][gh-pull-0331], by[@Swatinem][gh-Swatinem]).
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.