title: Why I have cache misses in Service using Spring Cache
body: <p>I have configured my cache as follows:</p>
  
  <pre><code>@Configuration
  @EnableCaching
  public class CacheConfig {
  
      @Bean(name = "caffeineCachingProvider")
      public CachingProvider caffeineCachingProvider() {
          return Caching.getCachingProvider("com.github.benmanes.caffeine.jcache.spi.CaffeineCachingProvider");
      }
  
      @Bean(name = "caffeineCacheManager")
      public JCacheCacheManager getSpringCacheManager() {
          CacheManager cacheManager = caffeineCachingProvider().getCacheManager();
          CaffeineConfiguration&lt;String, List&lt;Product&gt;&gt; caffeineConfiguration = new CaffeineConfiguration&lt;&gt;();
          caffeineConfiguration.setExpiryPolicyFactory(FactoryBuilder.factoryOf(new AccessedExpiryPolicy(new Duration(TimeUnit.MINUTES, 60))));
          caffeineConfiguration.setCopierFactory(Copier::identity);
          cacheManager.createCache("informerCache", caffeineConfiguration);
          return new JCacheCacheManager(cacheManager);
      }
  }
  </code></pre>
  
  <p>Also I have the <code>@Service</code> that uses it in following way:</p>
  
  <pre><code>@Service
  public class InformerService {
  
      @CacheResult(cacheName = "informerCache")
      public List&lt;Product&gt; getProducts(@CacheKey String category, @CacheKey String countrySign, @CacheKey long townId) throws Exception {
          Thread.sleep(5000);
          // do some work
      }
  }
  </code></pre>
  
  <p>So I have the next behavior.</p>
  
  <ol>
  <li>When I'm calling the service method first time it takes 5 seconds
  then doing some work as expected.</li>
  <li>Calling method the second time with same parameters - > caching works -> returns result immediately</li>
  <li>Calling the third time with same parameters again results in <code>Thread.sleep</code></li>
  </ol>
  
  <p>And all over again.</p>
  
  <p>How to solve this ? Is that the issue about proxying ? What did I miss ?</p>