title: Spring @Cacheable not caching
body: <p>Using Spring 3.2 with EhCache 2.9. I've annotated a zero-parameter method as follows:</p>
  
  <pre><code>@Cacheable(value="myList", key="#result.method.name")
  protected List&lt;MyObject&gt; getMyList() {
     //db query
     //return list of results
  }
  </code></pre>
  
  <p>EhCache config:</p>
  
  <pre><code>&lt;cache name="myList"
      statistics="true"
      maxEntriesLocalHeap="1"     
      timeToLiveSeconds="3600"&gt;
      &lt;persistence strategy="none" /&gt;
  &lt;/cache&gt; 
  </code></pre>
  
  <p>I'd like the database results to be cached. Since this method has no parameters, I've chosen the method name to be the cache key. </p>
  
  <p>When I test this, the database is hit every method invocation and I'm not sure why. Any ideas?</p>
  
  <hr>
  
  <p><strong>UPDATE</strong></p>
  
  <p>So after troubleshooting I found something interesting. Currently the <code>getMyList</code> method (on which the caching is defined) is in the same class that calls it. That method basically calls a DAO to query for the list. If I move <code>getMyList</code> outside to another class which just acts as a proxy, and then I change the original invoker to call this new proxy instead, then the caching works. I can't explain why. Any input?</p>