I've been reading up on Caffeine Cache and there are several things I don't understand.
In what case would you use Asnyc loading? isnt it risky. like its possible that your cache is automatically loading stuff in, in the background, and you try accessing that same stuff and then there's no point.
Also, is Caffeine scalable horizontally? why would it be beneficial to scale horizontally with a cache rather than just increase the throughput availability of the cache? if we wanna increase throughput is it better to increase the memory of the ec2 instance type or the max size the cache can grow to? can one instance have multiple caches used for different things?
And if a service uses one caffeine cache and has one instance, it doesn't make sense to me to have multiple cache managers, each with different options configured for population or eviction. Wouldn't you need consistency across the same cache?
for all intents and purposes assume this is for a service that uses EC2.
thank you so much!