heads up: Moka v0.7.0 has a breaking change #231
tatsuya6502
started this conversation in
General
Replies: 1 comment
-
Thanks! Upgraded moka in 9339cf8 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @messense,
Just a heads up. I have released Moka v0.7.0 but it has a small breaking change. I had to change the type of
max_capacity
fromusize
tou64
to support a new feature. So when you update the dependency for Moka, you will have to change themax_capacity
in the following code tou64
too.aliyundrive-webdav/src/cache.rs
Lines 14 to 20 in bc801e1
FYI, now Moka supports size-aware eviction. Instead of bounding a cache with the max number of cache entries, you can bound a cache with a sum of physical (or logical) sizes of entries. Here is a link to an example.
Also note that, in the example, a new method
builder()
is used. Now you can writeCache::builder().max_capacity(x) ... build()
instead ofCacheBuilder::new(x) ... build()
. It is a small change but you can removeCacheBuilder
fromuse
statement.Beta Was this translation helpful? Give feedback.
All reactions