I use ehcache in a webapp whose versions are [deployed in parallel](https://tomcat.apache.org/tomcat-8.0-doc/config/context.html#Parallel_deployment) on a Tomcat instance. This is a handy way to deploy new versions without stopping an application.

I however have a problem with this way to proceed : even if I give the cache and disk store different names, depending on the versions of the webapp, **all** caches are stopped when stopping **one** instance.

My config is :

```xml
<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="ehcache.xsd" name="mywebapp-${project.version}_build_${buildNumber}">
<defaultCache
    maxElementsInMemory="1000"
    maxElementsOnDisk="10000"
    eternal="false"
    timeToLiveSeconds="300"
    timeToIdleSeconds="300"
    overflowToDisk="true"
    diskPersistent="false"
    memoryStoreEvictionPolicy="LRU"
    statistics="true"
/>

<cache
    maxElementsInMemory="1000"
    maxElementsOnDisk="10000"
    name="org.hibernate.cache.internal.StandardQueryCache"
    eternal="false"
    timeToLiveSeconds="300"
    timeToIdleSeconds="300"
    overflowToDisk="true"
    diskPersistent="false"
    statistics="true"/>

<cache
    name="org.hibernate.cache.spi.UpdateTimestampsCache"
    maxElementsInMemory="10000"
    maxElementsOnDisk="100000"
    timeToLiveSeconds="300"
    timeToIdleSeconds="300"
    eternal="false"
    overflowToDisk="true"
    diskPersistent="false"
    statistics="true"/>

<cache
    name="query.Presences"
    maxElementsInMemory="100"
    maxElementsOnDisk="1000"
    eternal="false"
    timeToLiveSeconds="300"
    timeToIdleSeconds="300"
    overflowToDisk="true"
    diskPersistent="false"
    statistics="true"/>

<diskStore path="java.io.tmpdir/mywebapp-${project.version}_build_${buildNumber}"/> 

</ehcache>

```

`${project.version}` and `${buildNumber}`

being replaced by maven during the build process.

Does someone know how to avoid this unwanted behaviour ?

I am using ehcache-core-2.4.3 and hibernate-ehcache-4.3.8.