How do I store the cache to a remote server
lyzq opened this issue · comments
lyzq commented
I want to store the cache to a remote server, and i implement CacheMap.
Then i got :
Serialized class java.util.concurrent.CompletableFuture must implement java.io.Serializable
Brad Baker commented
Yup there is a design fault in the current code, that is what looks like CacheMap<U, V>
is in fact CacheMap<U, CompletableFuture<V>>
And CompletableFuture
is never going to be able to be serialised.
This has caught other people out. Our cache is in fact previously completed CFs -> values and not the values themselves.
This needs a major refactpr to fix
Brad Baker commented
See #45
Brad Baker commented
This PR attempts to improve this situation