fastcache
fastcache copied to clipboard
Support timeout for SaveToFile/SaveToFileConcurrent
In our project, fastcache consumes 40~50GB and it takes about 7 minutes to save the cache to the disk, which is too long.
As we can get benefit from saving only partial part of the cache to the disk, it would be nice if SaveToFile/SaveToFileConcurrent accepts Context to support timeout. How do you think?
I think it is better limiting the size of the cache, so it could be saved to disk in reasonable time. I see little sense in partially saved cache.
I think it is better limiting the size of the cache, so it could be saved to disk in reasonable time. I see little sense in partially saved cache.
@valyala We're currently saving the nodes of a tree to fastcache. As the nodes close to the root are frequently accessed, partially saved cache can be helpful. I think there might be similar cases like ours. How do you think?