先来说说常用属性吧

maxElementsInMemory="10000"  //内存中最多有10000个缓存块,或者说是缓存的数据对象

eternal="false"  //不是一直存在的,即有一定生存期,过了生存期就会被清除掉

timeToIdleSeconds="120"  //闲置时间,我的理解是过了120s没有访问的话就清除
timeToLiveSeconds="120"  //存活时间,

overflowToDisk="true"  //如果内存满了就放到硬盘里

maxElementsOnDisk="10000000"  //硬盘中缓存块的数量

diskPersistent="false"  //是否在重启虚拟机的时候把内存中的数据保存起来

diskExpiryThreadIntervalSeconds="120"

memoryStoreEvictionPolicy="LRU"  //内存分配采用的策略,LRU是最近最少使用算法

必选的属性有name,maxElementsInMemory,maxElementsOnDisk,eternal,overflowToDisk

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-03
  • 2021-12-12
  • 2021-11-20
猜你喜欢
  • 2021-12-11
  • 2021-10-08
  • 2022-02-12
  • 2021-10-17
  • 2022-01-20
  • 2021-06-12
相关资源
相似解决方案