title: How to cache data in Spring MVC web application within more HTTP requests?
body: <p>In one my web page (Spring MVC web application) I show a data in many forms (table, chart and another table). Because I load page contents via Ajax requests I don't want to load the same data on every request. The data belongs to one particular logged in user.</p>
  
  <p>Is there in Spring framework some suitable technique / cache handler how to handle this kind of data? I can use for this purpose <code>javax.servlet.http.HttpSession</code> object but I makes me wonder if is there some better technique.</p>
  
  <p><strong>Edit:</strong> in the meantime I found a possibility to define <code>session</code> scope in definition of my bean and I think it is what I need, isn't it?</p>
  
  <pre><code>&lt;bean id="pageDataCache" class="controller.utils.PageDataCache" scope="session"&gt;  
  &lt;aop:scoped-proxy/&gt;  
  &lt;/bean&gt;
  </code></pre>
  
  <p>So a new instance will be created for each HTTP Session and will store a data.</p>