2020-10-04 14:27:05 +08:00
|
|
|
|
{$layout}
|
2020-12-17 15:50:44 +08:00
|
|
|
|
{$template "policy_menu"}
|
2020-10-04 14:27:05 +08:00
|
|
|
|
|
2020-12-17 15:50:44 +08:00
|
|
|
|
<table class="ui table definition selectable">
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td class="title">策略名称</td>
|
|
|
|
|
|
<td>{{cachePolicy.name}}</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>状态</td>
|
|
|
|
|
|
<td><label-on :v-is-on="cachePolicy.isOn"></label-on></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td class="color-border">缓存类型</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
{{typeName}}<span class="small">({{cachePolicy.type}})</span>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2020-10-04 14:27:05 +08:00
|
|
|
|
|
2020-12-17 15:50:44 +08:00
|
|
|
|
<!-- 文件缓存选项 -->
|
|
|
|
|
|
<tbody v-if="cachePolicy.type == 'file'">
|
2021-03-02 19:38:13 +08:00
|
|
|
|
<tr>
|
|
|
|
|
|
<td class="color-border">缓存目录</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
{{cachePolicy.options.dir}}
|
|
|
|
|
|
<p class="comment">存放文件缓存的目录,通常填写绝对路径。</p>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
2023-08-06 18:09:01 +08:00
|
|
|
|
<td class="color-border">缓存磁盘最大用量</td>
|
2021-03-02 19:38:13 +08:00
|
|
|
|
<td>
|
|
|
|
|
|
<size-capacity-view :v-value="cachePolicy.capacity" :v-default-text="'不限'"></size-capacity-view>
|
2023-09-18 10:35:22 +08:00
|
|
|
|
<p class="comment">单个节点上缓存所在磁盘的最大用量,如果为0表示没有限制。</p>
|
2021-03-02 19:38:13 +08:00
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr v-if="cachePolicy.options.memoryPolicy != null && cachePolicy.options.memoryPolicy.capacity != null && cachePolicy.options.memoryPolicy.capacity.count > 0">
|
|
|
|
|
|
<td class="color-border">内存最大容量</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<size-capacity-view :v-value="cachePolicy.options.memoryPolicy.capacity"></size-capacity-view>
|
2022-04-14 15:58:39 +08:00
|
|
|
|
<p class="comment">作为一级缓存的内存最大容量,可以作为磁盘缓冲区和存储热点缓存内容,如果为0表示不使用内存作为一级缓存。</p>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr v-else>
|
|
|
|
|
|
<td class="color-border">内存最大容量</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<a :href="Tea.url('.update', {cachePolicyId:cachePolicy.id})"><span class="red">请设置一个内存容量作为缓冲区,以提升缓存写入性能。</span></a>
|
2021-03-02 19:38:13 +08:00
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2024-03-30 08:43:38 +08:00
|
|
|
|
<tr v-if="cachePolicy.options != null">
|
2024-03-29 19:30:12 +08:00
|
|
|
|
<td class="color-border">启用MMAP</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<span class="green" v-if="cachePolicy.options.enableMMAP || cachePolicy.options.enableMMAP == null">Y</span>
|
|
|
|
|
|
<span class="disabled" v-else>N</span>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2022-01-12 21:09:11 +08:00
|
|
|
|
<tr v-if="cachePolicy.options.openFileCache != null && cachePolicy.options.openFileCache.isOn && cachePolicy.options.openFileCache.max > 0">
|
2023-07-20 17:06:45 +08:00
|
|
|
|
<td class="color-border">缓存文件句柄缓存</td>
|
2022-01-12 21:09:11 +08:00
|
|
|
|
<td>{{cachePolicy.options.openFileCache.max}}</td>
|
|
|
|
|
|
</tr>
|
2023-07-20 17:06:45 +08:00
|
|
|
|
<tr v-if="cachePolicy.options.enableSendfile">
|
|
|
|
|
|
<td class="color-border">开启Sendfile</td>
|
|
|
|
|
|
<td><span v-if="cachePolicy.options.enableSendfile" class="green">Y</span><span v-else class="disabled">N</span></td>
|
|
|
|
|
|
</tr>
|
2023-08-06 18:09:01 +08:00
|
|
|
|
<tr v-if="cachePolicy.options.minFreeSize != null && cachePolicy.options.minFreeSize.count > 0">
|
|
|
|
|
|
<td class="color-border">缓存磁盘最小空余空间</td>
|
|
|
|
|
|
<td><size-capacity-view :v-value="cachePolicy.options.minFreeSize"></size-capacity-view></td>
|
|
|
|
|
|
</tr>
|
2020-12-17 15:50:44 +08:00
|
|
|
|
</tbody>
|
2020-10-04 14:27:05 +08:00
|
|
|
|
|
2021-03-02 19:38:13 +08:00
|
|
|
|
<tbody v-if="cachePolicy.type != 'file'">
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>缓存最大容量</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<size-capacity-view :v-value="cachePolicy.capacity" :v-default-text="'不限'"></size-capacity-view>
|
|
|
|
|
|
<p class="comment">允许缓存的最大容量,如果为0表示没有限制。</p>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
2020-12-17 15:50:44 +08:00
|
|
|
|
<tr>
|
|
|
|
|
|
<td colspan="2"><more-options-indicator></more-options-indicator></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tbody v-show="moreOptionsVisible">
|
2021-03-02 19:38:13 +08:00
|
|
|
|
<tr>
|
|
|
|
|
|
<td>最大内容长度</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<size-capacity-view :v-value="cachePolicy.maxSize" :v-default-text="'不限'"></size-capacity-view>
|
2022-03-06 19:48:50 +08:00
|
|
|
|
<p class="comment">允许缓存的单个内容最大尺寸,如果为0表示没有限制。</p>
|
2021-03-02 19:38:13 +08:00
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2022-02-24 20:12:15 +08:00
|
|
|
|
<tr>
|
|
|
|
|
|
<td>同步写入压缩缓存</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<span v-if="cachePolicy.syncCompressionCache" class="green">Y</span>
|
|
|
|
|
|
<span v-else class="disabled">N</span>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2023-08-06 17:06:28 +08:00
|
|
|
|
<tr>
|
|
|
|
|
|
<td>预热超时时间</td>
|
|
|
|
|
|
<td><span v-if="fetchTimeoutString.length > 0">{{fetchTimeoutString}}</span><span v-else class="disabled">使用默认</span></td>
|
|
|
|
|
|
</tr>
|
2021-03-02 19:38:13 +08:00
|
|
|
|
<tr>
|
|
|
|
|
|
<td>描述</td>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<span v-if="cachePolicy.description.length > 0">{{cachePolicy.description}}</span>
|
|
|
|
|
|
<span v-else class="disabled">暂时还没有描述。</span>
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
2020-12-17 15:50:44 +08:00
|
|
|
|
</tbody>
|
|
|
|
|
|
</table>
|
2020-10-04 14:27:05 +08:00
|
|
|
|
|
2021-05-24 09:02:55 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 默认缓存条件 -->
|
|
|
|
|
|
<h4>默认缓存条件</h4>
|
|
|
|
|
|
<http-cache-refs-box :v-cache-refs="cachePolicy.cacheRefs"></http-cache-refs-box>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 使用此策略的集群 -->
|
2020-12-17 15:50:44 +08:00
|
|
|
|
<h4>使用此策略的集群</h4>
|
|
|
|
|
|
<p class="comment" v-if="clusters.length == 0">暂时还没有集群使用此策略。</p>
|
|
|
|
|
|
<table class="ui table selectable" v-if="clusters.length > 0">
|
|
|
|
|
|
<tr v-for="cluster in clusters">
|
|
|
|
|
|
<td>{{cluster.name}}<link-icon :href="'/clusters/cluster?clusterId=' + cluster.id"></link-icon></td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</table>
|