Need help understanding why this does not work #878
-
What am I doing:
Please help me debug this. Specifically I have two questions:
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
@MrCroxx any help on this will be greatly appreciated |
Beta Was this translation helpful? Give feedback.
-
Hi, @sanketkedia . I found the disk cache is misconfigured. let cache = FoyerCacheConfig {
dir: Some(dir.clone()),
flushers: 1,
file_size: 1, // !!! This is the file size in bytes.
flush: true,
buffer_pool: 1,
..Default::default()
} |
Beta Was this translation helpful? Give feedback.
-
Hi @MrCroxx, Thank you for responding. I checked the code and I am multiplying it by 1024 * 1024 later when I build the cache. So I am setting it to 1MB and not 1 byte
|
Beta Was this translation helpful? Give feedback.
-
@MrCroxx any help on this? Sorry this is time sensitive on our side as this blocks release hence the followup |
Beta Was this translation helpful? Give feedback.
-
Hi, @sanketkedia . I found you are already using foyer v0.13.1 Please use the builder to build a cache with tuned default arguments instead of filling in EVERY argument. Please refer to the document: https://docs.rs/foyer/0.13.1/foyer/struct.HybridCacheBuilder.html |
Beta Was this translation helpful? Give feedback.
-
The test passes when I use the default config. So I am going to close this issue and mark as answer the suggestion of using default values. I still don't understand what is wrong in my custom config but that's for another day |
Beta Was this translation helpful? Give feedback.
Hi, @sanketkedia .
I found you are already using foyer v0.13.1
Please use the builder to build a cache with tuned default arguments instead of filling in EVERY argument.
Please refer to the document: https://docs.rs/foyer/0.13.1/foyer/struct.HybridCacheBuilder.html