No, Guava Cache is not suitable for your use case, because it stores data in memory. See this wiki page:
Generally, the Guava caching utilities are applicable whenever:
- You are willing to spend some memory to improve speed.
- You expect that keys will sometimes get queried more than once.
- Your cache will not need to store more data than what would fit in RAM. (Guava caches are local to a single run of your application. They
do not store data in files, or on outside servers. If this does not
fit your needs, consider a tool like Memcached.)
I can recommend you using Ehacache, it's very powerful and configurable.