I have an application where I get the data from database (using hibernate). I want to load the cache (per user) with database state once per day and use the cache instead.
Hibernate has 2 levels of cache. 1. First level 2. Second level
Second level chache
is for the whole application and first level cache
is for the current hibernate session. There is no cache
available per user basis.
Also if you are using spring managed beans + caching. There is a provision for you to cache the beans for entire application rather than for a user. (little uncertain on this)
It sounds to me that you want to store the data in the user's session
. ie., as long as the user is having an active session. Spring has a session scoped beans
you may want to use these to cache the data per user.