[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
maxBytesLocalHeap and defaultCache  XML
Forum Index -> Ehcache
Author Message
babltiga

neo

Joined: 12/14/2011 00:57:56
Messages: 1
Offline

Hi, my question is why ehcache.xsd prevents me to add maxBytesLocalHeap, maxBytesLocalOffHeap and maxBytesLocalDisk on the defaultCache element. I mean when I add maxBytesLocalHeap, maxBytesLocalOffHeap and maxBytesLocalDisk to defaultCache element in the ehcache.xml the xml validator complain about this entries, same about sizeOfPolicy subelement.

Code:
 	<defaultCache 
 		timeToIdleSeconds="0"
 		timeToLiveSeconds="0"
 		eternal="true"
 		overflowToDisk="true"
 		maxBytesLocalHeap="100M"
 		maxBytesLocalDisk="1G"	
 		memoryStoreEvictionPolicy="LRU" >
 		
 		<!-- The used for counting the object graph size in bytes  -->
 		<sizeOfPolicy maxDepthExceededBehavior="abort" maxDepth="1500" />
 		
 	</defaultCache>
 

[list]
1. Attribute 'maxBytesLocalDisk' is not allowed to appear in element 'defaultCache'.
2. Attribute 'maxBytesLocalHeap' is not allowed to appear in element 'defaultCache'.
3. Invalid content was found starting with element 'sizeOfPolicy'. One of '{cacheEventListenerFactory, cacheExtensionFactory, cacheLoaderFactory, cacheDecoratorFactory,
bootstrapCacheLoaderFactory, cacheExceptionHandlerFactory, pinning, terracotta, cacheWriter, copyStrategy, elementValueComparator}' is expected.
[/list]
alexsnaps

consul

Joined: 06/19/2009 09:06:00
Messages: 463
Offline

Mainly because there is no way for us to honour this over time (no idea how many caches you'll be creating off that default cache).
You might want to look into adding the maxBytes* attribute to the CacheManager instead.

Alex Snaps (Terracotta engineer)
 
Forum Index -> Ehcache
Go to:   
Powered by JForum 2.1.7 © JForum Team