title: How can I set a custom KeyGenerator for Spring Cache?
body: <p>I'm using Spring 3.1 and I want to use the new cache features. Then, I tried:</p>
  
  <pre><code>&lt;cache:annotation-driven /&gt;
  
  &lt;bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"
      p:cache-manager-ref="ehcache" /&gt;
  
  &lt;!-- Ehcache library setup --&gt;
  &lt;bean id="ehcache"
      class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"
      p:config-location="classpath:ehcache.xml" /&gt;
  </code></pre>
  
  <p>But I didn't find the way to configure my custom KeyGenerator. Any idea?</p>