We have a web application that loads a User object from a database. This is a large application with thousands of concurrent users, so we are considering ways to cache User objects to minimize database load.
Ehcache is currently being used, but they are looking at memcached to lower application memory requirements and make it more scalable.
The problem we are currently encountering with memcached is CPU usage, which results in serialization of the user instance. We are considering ways to speed up serialization, but also considering using the smaller ehcache cache supported by memcached.
Does anyone have experience using memcached-supported ehcache (i.e. first glance at ehcache, if the user is not there, look at memcache if it does not look in the database)?
Any flaws in this approach?
java java-ee caching memcached ehcache
objects
source share