mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-05 06:10:26 +08:00
优化缓存条件设置,支持不缓存条件设置,支持条件排序等
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// 单个缓存条件设置
|
||||
Vue.component("http-cache-ref-box", {
|
||||
props: ["v-cache-ref"],
|
||||
props: ["v-cache-ref", "v-is-reverse"],
|
||||
data: function () {
|
||||
let ref = this.vCacheRef
|
||||
if (ref == null) {
|
||||
@@ -14,7 +15,8 @@ Vue.component("http-cache-ref-box", {
|
||||
skipSetCookie: true,
|
||||
enableRequestCachePragma: false,
|
||||
conds: null,
|
||||
allowChunkedEncoding: true
|
||||
allowChunkedEncoding: true,
|
||||
isReverse: this.vIsReverse
|
||||
}
|
||||
}
|
||||
if (ref.life == null) {
|
||||
@@ -51,50 +53,50 @@ Vue.component("http-cache-ref-box", {
|
||||
<input type="hidden" name="cacheRefJSON" :value="JSON.stringify(ref)"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr v-show="!vIsReverse">
|
||||
<td>缓存有效期 *</td>
|
||||
<td>
|
||||
<time-duration-box :v-value="ref.life" @change="changeLife"></time-duration-box>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr v-show="!vIsReverse">
|
||||
<td>缓存Key *</td>
|
||||
<td>
|
||||
<input type="text" v-model="ref.key"/>
|
||||
<p class="comment">用来区分不同缓存内容的唯一Key。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr v-show="!vIsReverse">
|
||||
<td colspan="2"><more-options-indicator @change="changeOptionsVisible"></more-options-indicator></td>
|
||||
</tr>
|
||||
<tr v-show="moreOptionsVisible">
|
||||
<tr v-show="moreOptionsVisible && !vIsReverse">
|
||||
<td>可缓存的最大文件</td>
|
||||
<td>
|
||||
<size-capacity-box :v-value="ref.maxSize" @change="changeMaxSize"></size-capacity-box>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="moreOptionsVisible">
|
||||
<tr v-show="moreOptionsVisible && !vIsReverse">
|
||||
<td>支持分片内容</td>
|
||||
<td>
|
||||
<checkbox name="allowChunkedEncoding" value="1" v-model="ref.allowChunkedEncoding"></checkbox>
|
||||
<p class="comment">选中后,Gzip和Chunked内容可以直接缓存,无需检查内容长度。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="moreOptionsVisible">
|
||||
<tr v-show="moreOptionsVisible && !vIsReverse">
|
||||
<td>状态码列表</td>
|
||||
<td>
|
||||
<values-box name="statusList" size="3" maxlength="3" :values="ref.status"></values-box>
|
||||
<p class="comment">允许缓存的HTTP状态码列表。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="moreOptionsVisible">
|
||||
<tr v-show="moreOptionsVisible && !vIsReverse">
|
||||
<td>跳过的Cache-Control值</td>
|
||||
<td>
|
||||
<values-box name="skipResponseCacheControlValues" size="10" maxlength="100" :values="ref.skipCacheControlValues"></values-box>
|
||||
<p class="comment">当响应的Cache-Control为这些值时不缓存响应内容,而且不区分大小写。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="moreOptionsVisible">
|
||||
<tr v-show="moreOptionsVisible && !vIsReverse">
|
||||
<td>跳过Set-Cookie</td>
|
||||
<td>
|
||||
<div class="ui checkbox">
|
||||
@@ -104,7 +106,7 @@ Vue.component("http-cache-ref-box", {
|
||||
<p class="comment">选中后,当响应的Header中有Set-Cookie时不缓存响应内容。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="moreOptionsVisible">
|
||||
<tr v-show="moreOptionsVisible && !vIsReverse">
|
||||
<td>支持请求no-cache刷新</td>
|
||||
<td>
|
||||
<div class="ui checkbox">
|
||||
|
||||
Reference in New Issue
Block a user