Author: olamy
Date: Wed Dec 26 22:36:05 2012
New Revision: 1426070

URL: http://svn.apache.org/viewvc?rev=1426070&view=rev
Log:
modify cache configuration with maxElementsInMemory  is changed at runtime level

Modified:
    
archiva/redback/redback-components/trunk/spring-cache/spring-cache-providers/spring-cache-ehcache/src/main/java/org/apache/archiva/redback/components/cache/ehcache/EhcacheCache.java

Modified: 
archiva/redback/redback-components/trunk/spring-cache/spring-cache-providers/spring-cache-ehcache/src/main/java/org/apache/archiva/redback/components/cache/ehcache/EhcacheCache.java
URL: 
http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-cache/spring-cache-providers/spring-cache-ehcache/src/main/java/org/apache/archiva/redback/components/cache/ehcache/EhcacheCache.java?rev=1426070&r1=1426069&r2=1426070&view=diff
==============================================================================
--- 
archiva/redback/redback-components/trunk/spring-cache/spring-cache-providers/spring-cache-ehcache/src/main/java/org/apache/archiva/redback/components/cache/ehcache/EhcacheCache.java
 (original)
+++ 
archiva/redback/redback-components/trunk/spring-cache/spring-cache-providers/spring-cache-ehcache/src/main/java/org/apache/archiva/redback/components/cache/ehcache/EhcacheCache.java
 Wed Dec 26 22:36:05 2012
@@ -380,6 +380,12 @@ public class EhcacheCache
     public void setMaxElementsInMemory( int maxElementsInMemory )
     {
         this.maxElementsInMemory = maxElementsInMemory;
+        if ( this.ehcache != null )
+        {
+            this.ehcache.getCacheConfiguration().setMaxElementsInMemory( 
this.maxElementsInMemory );
+            this.ehcache.getCacheConfiguration().setMaxEntriesLocalHeap( 
this.maxElementsInMemory );
+
+        }
     }
 
     public void setMemoryEvictionPolicy( String memoryEvictionPolicy )


Reply via email to