Skip to content

Is moka::future::Cache blocking insert has similar efficiency comparing to the moka::sync::Cache insert? #239

Answered by tatsuya6502
LMJW asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @LMJW

I did some very basic source code dive, looks the blocking insert for future cache underline depends on blocking_schedule_write_op code which has the same code as schedule_write_op in sync cache. So I imaging the blocking insert in future cache is as efficient as insert in sync cache?

You are right (as of Moka v0.10.0).

However, I was thinking to deprecate blocking() method of future::Cache in v0.11.0 and eventually remove. This is because future::Cache in v0.11.0 will no longer be able to share the same base_cache::BaseCache implementation with sync::Cache. In order to support some features like #228 (comment), future::Cache should start to use async version of locks throughou…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@LMJW
Comment options

@tatsuya6502
Comment options

@LMJW
Comment options

Answer selected by LMJW
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants