title: EhCache : Why my diskStore path directory is not created?
body: <p>I am working with ehcache. I am caching Spring @Service method : </p>
  
  <pre><code>@Service( value = "dataServicesManager" )
  @Transactional
  public class DataServicesManager implements IDataServicesManager{
  
      @Autowired
      private IDataDAO dataDAO;
  
  
  
      @Override
      @Cacheable( value = "alldatas" )
      public List&lt;Data&gt; getAllDatas(Integer param) {
  
                  // my logic
  
          return results;
  
      }
  // others services
  }
  </code></pre>
  
  <p>Here is the Spring configuration snippet:</p>
  
  <pre><code> &lt;cache:annotation-driven/&gt;
  
  &lt;bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"&gt;
      &lt;property name="cacheManager" ref="ehcache"/&gt;
  &lt;/bean&gt;
  &lt;bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"&gt;
      &lt;property name="configLocation" value="WEB-INF/ehcache.xml"/&gt;
      &lt;property name="shared" value="true"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Here is my ehcache configuration.</p>
  
  <pre><code>&lt;ehcache xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="true" monitoring="autodetect" dynamicConfig="true"&gt;
  
  &lt;diskStore path="C:/TEMP/ehcache"/&gt;
  
  &lt;defaultCache   eternal="false"
         timeToIdleSeconds="300"
         timeToLiveSeconds="1200"
         overflowToDisk="true"
         diskPersistent="false"
         diskExpiryThreadIntervalSeconds="120" /&gt;
  
  &lt;cache name="alldatas" maxEntriesLocalHeap="10000" eternal="false"
          timeToIdleSeconds="21600" timeToLiveSeconds="21600" memoryStoreEvictionPolicy="LRU"&gt;
  
      &lt;/cache&gt;
  
  &lt;/ehcache&gt;
  </code></pre>
  
  <p>When i call the service method getAllDatas from a Spring @Controller the method is cached and the second time call retrieve the result stores in cache. 
  What i don't understand is that i cannot find the <code>&lt;diskStore path="C:/TEMP/ehcache"/&gt;</code> specify in the ehcache.xml. So i have two questions :</p>
  
  <p><strong>Question 1:</strong> Why "C:/TEMP/ehcache" directory is not created ?</p>
  
  <p><strong>Question 2:</strong> Where is cached my service results ?</p>