When overFlowToDisk gets activated in EHCACHE?

后端 未结 2 1087
执念已碎
执念已碎 2020-12-15 10:21

I have some questions on \"overflowToDisk\" attribute of element?

1) I read at this URL that :

overflowToDisk sets whether element can overflow to disk when

2条回答
  •  萌比男神i
    2020-12-15 10:54

    Elements start to overflow to the disk when you have more than maxElementsInMemory of them in the memory store. The following example creates a cache that stores 1000 elements in memory, and, if you need to store more, up to 10000 on disk:

    
    
    

    For the second question, have a look at the diskPersistent parameter. If it is set to true, Ehcache will keep your data stored on the disk when you stop the JVM. The following example demonstrates this:

    
    
    

提交回复
热议问题