title: WebApp Session Management using Ehcache
body: <p>In my project I am using ehcache to store loggged in user details and some other information (which app will use this at runtime instead of fetching from db). The following is my ehcache configuration:</p>
  
  <pre><code>&lt;cache 
      name="normalCache"
      maxElementsInMemory="50000" 
      eternal="false"
      timeToIdleSeconds="1800" 
      timeToLiveSeconds="0"
      overflowToDisk="false"
      memoryStoreEvictionPolicy="LRU"
  /&gt;
  </code></pre>
  
  <p>But the problem is most of the time session timeout happening (even user is not inactive more >30). Sometimes its happening for 10 mins,...</p>
  
  <p>All the actions will try to retrieve user object per each request from the ehcache.</p>
  
  <p>I am not sure how ehcache will determine expiry time.</p>