Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cms_sys
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
西魏
cms_sys
Commits
02fae226
Commit
02fae226
authored
Apr 28, 2021
by
msgroup
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5.2.1发布
parent
b4944ccc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
66 deletions
+0
-66
banner.txt
src/main/resources/banner.txt
+0
-8
ehcache.xml
src/main/resources/ehcache.xml
+0
-58
No files found.
src/main/resources/banner.txt
deleted
100644 → 0
View file @
b4944ccc
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.2.13.RELEASE)
:: MS MCms 系统 :: (v5.2.*)
src/main/resources/ehcache.xml
deleted
100644 → 0
View file @
b4944ccc
<?xml version="1.0" encoding="UTF-8"?>
<ehcache
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"ehcache.xsd"
updateCheck=
"false"
monitoring=
"autodetect"
dynamicConfig=
"true"
>
<diskStore
path=
"java.io.tmpdir/ehcache"
/>
<defaultCache
maxElementsInMemory=
"50000"
eternal=
"false"
timeToIdleSeconds=
"3600"
timeToLiveSeconds=
"3600"
overflowToDisk=
"true"
diskPersistent=
"false"
diskExpiryThreadIntervalSeconds=
"120"
/>
<!-- 全局变量:永不过期-->
<cache
name=
"CONSTANT"
maxElementsInMemory=
"50000"
eternal=
"true"
clearOnFlush=
"false"
overflowToDisk=
"true"
diskSpoolBufferSizeMB=
"1024"
maxElementsOnDisk=
"100000"
diskPersistent=
"false"
diskExpiryThreadIntervalSeconds=
"120"
memoryStoreEvictionPolicy=
"LFU"
transactionalMode=
"off"
>
</cache>
</ehcache>
<!--
maxElementsInMemory="10000" //Cache中最多允许保存的数据对象的数量
external="false" //缓存中对象是否为永久的,如果是,超时设置将被忽略,对象从不过期
timeToLiveSeconds="3600" //缓存的存活时间,从开始创建的时间算起
timeToIdleSeconds="3600" //多长时间不访问该缓存,那么ehcache 就会清除该缓存
这两个参数很容易误解,看文档根本没用,我仔细分析了ehcache的代码。结论如下:
1、timeToLiveSeconds的定义是:以创建时间为基准开始计算的超时时长;
2、timeToIdleSeconds的定义是:在创建时间和最近访问时间中取出离现在最近的时间作为基准计算的超时时长;
3、如果仅设置了timeToLiveSeconds,则该对象的超时时间=创建时间+timeToLiveSeconds,假设为A;
4、如果没设置timeToLiveSeconds,则该对象的超时时间=min(创建时间,最近访问时间)+timeToIdleSeconds,假设为B;
5、如果两者都设置了,则取出A、B最少的值,即min(A,B),表示只要有一个超时成立即算超时。
overflowToDisk="true" //内存不足时,是否启用磁盘缓存
diskSpoolBufferSizeMB //设置DiskStore(磁盘缓存)的缓存区大小。默认是30MB。每个Cache都应该有自己的一个缓冲区
maxElementsOnDisk //硬盘最大缓存个数
diskPersistent //是否缓存虚拟机重启期数据The default value is false
diskExpiryThreadIntervalSeconds //磁盘失效线程运行时间间隔,默认是120秒。
memoryStoreEvictionPolicy="LRU" //当达到maxElementsInMemory限制时,Ehcache将会根据指定的策略去清理内存。默认策略是LRU(最近最少使用)。你可以设置为FIFO(先进先出)或是LFU(较少使用)。
clearOnFlush //内存数量最大时是否清除
maxEntriesLocalHeap="0" //堆内存中最大缓存对象数,0没有限制
maxEntriesLocalDisk="1000" //硬盘最大缓存个数。
-->
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment