title: Spring 3.1 Cache Abstraction without parameters
body: <p>reading about the new <a href="http://blog.springsource.org/2011/02/23/spring-3-1-m1-caching/">Cache Abstraction</a> in Spring 3.1, I wanted to apply this feature to my project. </p>
  
  <p>Can I cache the call to a method that has no parameters?</p>
  
  <pre><code>@Cacheable("xCache")
  public List&lt;X&gt; loadAllX() {
      ...
  }
  </code></pre>
  
  <p>The linked blog post states</p>
  
  <blockquote>
    <p>a cache lookup is performed using as key the method parameters</p>
  </blockquote>
  
  <p>so it should not be possible to cache this method, right?</p>
  
  <p><strong>Short answer:</strong> Yes, methods without any arguments will get cached just like any other methods. I guess there will be exactly one entry in the cache for that method.</p>