title: Persistent storage with SimpleCacheManager
body: <p>I got an issue where the method on my service has annotation that looks like the following:</p>
  <pre><code>@Cacheable(value = &quot;myCache&quot;, key = &quot;'myCache' + #listType&quot;, unless = &quot;#result.getMyList().size() == 0&quot;)
  </code></pre>
  <p>On my EhCacheConfig I have that looks like the following:</p>
  <pre><code> @Bean
      public CacheManager cacheManager() {
          SimpleCacheManager cacheManager = new SimpleCacheManager();
          List&lt;Cache&gt; caches = new ArrayList&lt;Cache&gt;();
          caches.add(new ConcurrentMapCache(&quot;myCache&quot;));
          cacheManager.setCaches(caches);
          return cacheManager;
      }
  </code></pre>
  <p>The cache works just as I expect it to but now I need to have a persistent storage and I can only find how to do it with PersistentCacheManager. when I try to implement it following <a href="https://www.ehcache.org/documentation/3.9/tiering.html#disk" rel="nofollow noreferrer">EhCache documentation</a> I keep getting an error:</p>
  <pre><code>&quot;Cannot find cache named 'myCache' for Builder
  </code></pre>
  <p>This is my EhCacheConfig when implementing PersistentCacheManager:</p>
  <pre><code>@Bean
      public PersistentCacheManager cacheManager() {
          PersistentCacheManager persistentCacheManager = CacheManagerBuilder.newCacheManagerBuilder()
                  .with(CacheManagerBuilder.persistence(new File(storagePath, &quot;myData&quot;)))
                  .withCache(&quot;myCache&quot;, CacheConfigurationBuilder.newCacheConfigurationBuilder(String.class, NotificationListResponse.class,
                          ResourcePoolsBuilder.newResourcePoolsBuilder()
                                  .disk(10, MemoryUnit.MB, true))
                  )
                  .build();
          persistentCacheManager.init(true);
          return persistentCacheManager;
      }
  </code></pre>