mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 04:10:27 +08:00
缓存策略增加“允许读取不完整的Partial Content”选项
This commit is contained in:
@@ -84,6 +84,13 @@
|
||||
<p class="comment"><pro-warning-label></pro-warning-label><plus-label></plus-label>使用sendfile提升发送缓存文件的效率。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color-border">允许读取不完整的Partial Content</td>
|
||||
<td>
|
||||
<checkbox name="enableIncompletePartialContent" checked="checked"></checkbox>
|
||||
<p class="comment">允许在有一部分内容缓存的情况下读取分区内容,剩余的部分将会自动回源读取。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="moreOptionsVisible && policyType == 'file'">
|
||||
<td class="color-border">启用MMAP</td>
|
||||
<td>
|
||||
|
||||
@@ -58,11 +58,16 @@
|
||||
<td class="color-border">缓存硬盘最小空余空间</td>
|
||||
<td><size-capacity-view :v-value="cachePolicy.options.minFreeSize"></size-capacity-view></td>
|
||||
</tr>
|
||||
<tr v-if="cachePolicy.options != null">
|
||||
<tr v-if="cachePolicy.options.enableIncompletePartialContent">
|
||||
<td class="color-border">允许读取不完整的Partial Content</td>
|
||||
<td>
|
||||
<span class="green">Y</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="cachePolicy.options.enableMMAP">
|
||||
<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>
|
||||
<span>Y</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -91,6 +91,13 @@
|
||||
<p class="comment"><pro-warning-label></pro-warning-label><plus-label></plus-label>使用sendfile提升发送缓存文件的效率。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color-border">允许读取不完整的Partial Content</td>
|
||||
<td>
|
||||
<checkbox name="enableIncompletePartialContent" v-model="cachePolicy.options.enableIncompletePartialContent"></checkbox>
|
||||
<p class="comment">允许在有一部分内容缓存的情况下读取分区内容,剩余的部分将会自动回源读取。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color-border">启用MMAP</td>
|
||||
<td>
|
||||
|
||||
@@ -13,6 +13,7 @@ Tea.context(function () {
|
||||
let options = this.cachePolicy.options
|
||||
if (options != null && typeof options == "object" && typeof options["dir"] === "undefined") {
|
||||
options["enableMMAP"] = false
|
||||
options["enableIncompletePartialContent"] = true
|
||||
options["dir"] = "/opt/cache"
|
||||
options["memoryPolicy"] = {
|
||||
capacity: {
|
||||
|
||||
Reference in New Issue
Block a user