Spring @Cacheable not caching
Using Spring 3.2 with EhCache 2.9. I've annotated a zero-parameter method as follows: @Cacheable(value="myList", key="#result.method.name") protected List<MyObject> getMyList() { //db query //return list of results } EhCache config: <cache name="myList" statistics="true" maxEntriesLocalHeap="1" timeToLiveSeconds="3600"> <persistence strategy="none" /> </cache> 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. When I test this, the database is hit every method invocation and I'm not sure why. Any ideas? UPDATE So