title: My @Cacheable seems to be ignored (Spring)
body: <p>I have to cache the result of the following <code>public</code> method :</p>
  
  <pre><code>    @Cacheable(value = "tasks", key = "#user.username")
      public Set&lt;MyPojo&gt; retrieveCurrentUserTailingTasks(UserInformation user) {
          Set&lt;MyPojo&gt; resultSet;
          try {
              nodeInformationList = taskService.getTaskList(user);
          } catch (Exception e) {
              throw new ApiException("Error while retrieving tailing tasks", e);
          }
          return resultSet;
      }
  </code></pre>
  
  <p>I also configured Caching here :</p>
  
  <pre><code>@Configuration
  @EnableCaching(mode = AdviceMode.PROXY)
  public class CacheConfig  {
  
  @Bean
  public CacheManager cacheManager() {
      final SimpleCacheManager cacheManager = new SimpleCacheManager();
      cacheManager.setCaches(Arrays.asList(new ConcurrentMapCache("tasks"),new ConcurrentMapCache("templates")));
      return cacheManager;
  }
  
  @Bean
  public CacheResolver cacheResolver() {
      final SimpleCacheResolver cacheResolver = new SimpleCacheResolver(cacheManager());
      return cacheResolver;
  }
  
  }
  </code></pre>
  
  <p>I assert the following :</p>
  
  <ol>
  <li>Cache is initialized and does exist within Spring Context</li>
  <li>I used jvisualvm to track <code>ConcurrentMapCache</code> (2 instances), they are
  there in the heap but empty</li>
  <li>Method returns same values per user.username</li>
  <li>I tried the same configuration using spring-boot based project and
  it worked</li>
  <li>The method is public and is inside a Spring Controller</li>
  <li>The annotation <code>@CacheConfig(cacheNames = "tasks")</code> added on top of my
  controller</li>
  </ol>
  
  <p><strong>Spring version 4.1.3.RELEASE</strong>
  <strong>Jdk 1.6</strong></p>
  
  <p>Update 001 :</p>
  
  <pre><code>  @RequestMapping(value = "/{kinematicId}/status/{status}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
  public DocumentNodeWrapper getDocumentsByKinematicByStatus(@PathVariable String kinematicId, @PathVariable String status, HttpServletRequest request) {
      UserInformation user = getUserInformation(request);
      Set&lt;ParapheurNodeInformation&gt; nodeInformationList =  retrieveCurrentUserTailingTasks(user);
      final List&lt;DocumentNodeVO&gt; documentsList = getDocumentsByKinematic(kinematicId, user, nodeInformationList);
  
      List&lt;DocumentNodeVO&gt; onlyWithGivenStatus = filterByStatus(documentsList);
  
      return new DocumentNodeWrapper("filesModel", onlyWithGivenStatus, user, currentkinematic);
  }
  </code></pre>
  
  <p>Thanks</p>