Created
March 1, 2013 08:28
-
-
Save oscarrenalias/5063249 to your computer and use it in GitHub Desktop.
A better ehcache.xml configuration file for the Play Framework, which out of the box limits the size of the cache based on the number of objects you put in it rather than the number of bytes. I personally think that's not a very smart choice. Also see http://ehcache.org/documentation/2.5/configuration/cache-size#cache-configuration-sizing-attrib…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../config/ehcache.xsd" updateCheck="false"> | |
<!-- This is a default configuration for 256Mb of cached data using the JVM's heap, but it must be adjusted | |
according to specific requirement and heap sizes --> | |
<defaultCache | |
maxBytesLocalHeap="256000000" | |
eternal="false" | |
timeToIdleSeconds="120" | |
timeToLiveSeconds="120" | |
overflowToDisk="false" | |
maxElementsOnDisk="10000000" | |
diskPersistent="false" | |
diskExpiryThreadIntervalSeconds="120" | |
memoryStoreEvictionPolicy="LRU" | |
/> | |
</ehcache> |
excellent! Thanks
Tnx, default limit was killing our server, in very slow and secret ninja way.
Referenced documentation of the current version: http://www.ehcache.org/documentation/2.7/configuration/cache-size.html#cache-configuration-sizing-attributes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Useful, thanks for sharing!