i'm adding local cache to my server by using google's guava utils.
guava is very suitable for my scenario, except it can only store "non-null" values into its local cache (both com.google.common.cache.Cache and com.google.common.cache.LoadingCache did).
well, this is not good. because my server may fail to get values from remote database, because of time run out or other reasons. if i give a default value to guava, it will be stored in local cache, and will always be there, unless some eviction conditions were met. but the question is i cannot give a reasonable default value to guava.
can somebody tell me, why guava has this constraint, and how can i bypass it? can ehcache be more suited for my case?