title: Storing user data in Cache/session in Spring based web application
body: <p>In my project we provide search functionality to user.user can set values in  2 dozen search parameters available.On search we fetch the search result plus store the searchparameters (which were selected by user ) in database(this is causing a serious performance prob),so that next time when the user come to search page his previous search parameter are loaded on page load.</p>
  
  <p>I want to store the search parameter in session or cache (during the entire user session) and when user logs out commit them to database ,instead of committing to database on every search.When user comes to search page DAO checks for value of search parameter first in cache/session then try to fetch from DB.
  Can anyone suggest any solution for this problem
  Technology used- Spring 3+ Hibernate 3.6 + Tomcat 6 + EHCache +JSP</p>