title: timetoliveseconds ehcache spring boot config is not working
body: <p>Below is my ehcache Config file </p>
  
  <pre><code>&lt;ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="ehcache.xsd"
      updateCheck="true"
      monitoring="autodetect"
      dynamicConfig="true"&gt;
  
      &lt;diskStore path="java.io.tmpdir" /&gt;
  
  
  
      &lt;cache name="trans"
          maxEntriesLocalHeap="10000"
          maxEntriesLocalDisk="1000"
          eternal="false"
          diskSpoolBufferSizeMB="20"
          timeToIdleSeconds="0"
          timeToLiveSeconds="6"
          memoryStoreEvictionPolicy="LFU"
          transactionalMode="off"&gt;
          &lt;persistence strategy="localTempSwap" /&gt;
      &lt;/cache&gt;    
  &lt;/ehcache&gt;
  </code></pre>
  
  <p>All Spring annotation and configurations are working correctly</p>
  
  <pre><code>@Component
  @CacheConfig(cacheNames = {"trans" })
  public class MyTransService {
  
      private List&lt;Trans&gt; list;
  
      @Autowired
      private EhCacheCacheManager manage;
  
      @PostConstruct
      public void setup() {
          list = new ArrayList&lt;&gt;();
      }
  
      @CachePut
      public void addTransaction(Trans trans) {
          this.list.add(trans);
      }
  
      @CacheEvict(allEntries = true)
      public void deleteAll() {
          this.list.clear();
      }    
  }
  </code></pre>
  
  <p>But the cache is not getting clear after <strong>timetoliveseconds</strong>. </p>
  
  <p>Can someone help me whats wrong in my config.</p>
  
  <p>Below page says that it's bug , but not sure how to fix this ?<br>
  <strong>I am using spring-boot-starter-cache-2.0.3 version</strong> </p>
  
  <p><a href="https://github.com/ehcache/ehcache-jcache/issues/26" rel="nofollow noreferrer">https://github.com/ehcache/ehcache-jcache/issues/26</a></p>
  
  <p>there are some similar questions but not providing any solutions  </p>