<!--

    Copyright (c) Members of the EGEE Collaboration. 2006-2009.
    See http://www.eu-egee.org/partners/ for details on the copyright holders.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

    Authors:
    	Andrea Ceccanti (INFN)

-->
<ehcache>

    <!-- Sets the path to the directory where cache .data files are created.

         If the path is a Java System Property it is replaced by
         its value in the running VM.

         The following properties are translated:
         user.home - User's home directory
         user.dir - User's current working directory
         java.io.tmpdir - Default temp file path -->
    <diskStore path="java.io.tmpdir"/>


    <!--Default Cache configuration. These will applied to caches programmatically created through
        the CacheManager.

        The following attributes are required for defaultCache:

        maxInMemory       - Sets the maximum number of objects that will be created in memory
        eternal           - Sets whether elements are eternal. If eternal,  timeouts are ignored and the element
                            is never expired.
        timeToIdleSeconds - Sets the time to idle for an element before it expires. Is only used
                            if the element is not eternal. Idle time is now - last accessed time
        timeToLiveSeconds - Sets the time to live for an element before it expires. Is only used
                            if the element is not eternal. TTL is now - creation time
        overflowToDisk    - Sets whether elements can overflow to disk when the in-memory cache
                            has reached the maxInMemory limit.

        -->
    <defaultCache
        maxElementsInMemory="500"
        eternal="false"
        timeToIdleSeconds="1800"
        timeToLiveSeconds="3600"
        overflowToDisk="false"
        />

    <!--Predefined caches.  Add your cache configuration settings here.
        If you do not have a configuration for your cache a WARNING will be issued when the
        CacheManager starts

        The following attributes are required for defaultCache:

        name              - Sets the name of the cache. This is used to identify the cache. It must be unique.
        maxInMemory       - Sets the maximum number of objects that will be created in memory
        eternal           - Sets whether elements are eternal. If eternal,  timeouts are ignored and the element
                            is never expired.
        timeToIdleSeconds - Sets the time to idle for an element before it expires. Is only used
                            if the element is not eternal. Idle time is now - last accessed time
        timeToLiveSeconds - Sets the time to live for an element before it expires. Is only used
                            if the element is not eternal. TTL is now - creation time
        overflowToDisk    - Sets whether elements can overflow to disk when the in-memory cache
                            has reached the maxInMemory limit.

        -->
        
        
        
      <cache 
        name="org.glite.security.voms.admin.persistence.model.VOMSUser"
        maxElementsInMemory="3000"
        eternal="false"
        timeToIdleSeconds="1800"
        timeToLiveSeconds="3600"
        overflowToDisk="false"/>
        
      <cache 
        name="org.glite.security.voms.admin.persistence.model.VOMSMapping"
        maxElementsInMemory="3000"
        eternal="false"
        timeToIdleSeconds="1800"
        timeToLiveSeconds="3600"
        overflowToDisk="false"/>
        
      <cache 
        name="org.glite.security.voms.admin.persistence.model.VOMSCA"
        maxElementsInMemory="200"
        eternal="true"
        timeToIdleSeconds="0"
        timeToLiveSeconds="0"
        overflowToDisk="false"/>
      
      <cache 
        name="org.glite.security.voms.admin.persistence.model.VOMSGroup"
        maxElementsInMemory="500"
        eternal="true"
        timeToIdleSeconds="0"
        timeToLiveSeconds="0"
        overflowToDisk="true"/>
        
      <cache 
        name="org.glite.security.voms.admin.persistence.model.VOMSRole"
        maxElementsInMemory="500"
        eternal="true"
        timeToIdleSeconds="0"
        timeToLiveSeconds="0"
        overflowToDisk="true"/>
        
      <cache 
        name="org.glite.security.voms.admin.persistence.model.VOMSAdmin"
        maxElementsInMemory="500"
        eternal="false"
        timeToIdleSeconds="1800"
        timeToLiveSeconds="3600"
        overflowToDisk="false"/>
      
      <!--   
      <cache 
        name="org.glite.security.voms.admin.persistence.model.ACL"
        maxElementsInMemory="500"
        eternal="false"
        timeToIdleSeconds="1800"
        timeToLiveSeconds="5000"
        overflowToDisk="false"/>
      -->
    <!-- Place configuration for your caches following -->

</ehcache>