Vue.component("http-cache-ref-box", { props: ["v-cache-ref"], data: function () { let ref = this.vCacheRef if (ref == null) { ref = { isOn: true, cachePolicyId: 0, key: "${scheme}://${host}${requestURI}", life: {count: 2, unit: "hour"}, status: [200], maxSize: {count: 32, unit: "mb"}, skipCacheControlValues: ["private", "no-cache", "no-store"], skipSetCookie: true, enableRequestCachePragma: false, conds: null, allowChunkedEncoding: true } } if (ref.life == null) { ref.life = {count: 2, unit: "hour"} } if (ref.maxSize == null) { ref.maxSize = {count: 32, unit: "mb"} } return { ref: ref, moreOptionsVisible: false } }, methods: { changeOptionsVisible: function (v) { this.moreOptionsVisible = v }, changeLife: function (v) { this.ref.life = v }, changeMaxSize: function (v) { this.ref.maxSize = v }, changeConds: function (v) { this.ref.conds = v } }, template: ` 匹配条件 * 缓存有效期 * 缓存Key *

用来区分不同缓存内容的唯一Key。

可缓存的最大文件 支持分片内容

选中后,Gzip和Chunked内容可以直接缓存,无需检查内容长度。

状态码列表

允许缓存的HTTP状态码列表。

跳过的Cache-Control值

当响应的Cache-Control为这些值时不缓存响应内容,而且不区分大小写。

跳过Set-Cookie

选中后,当响应的Header中有Set-Cookie时不缓存响应内容。

支持请求no-cache刷新

选中后,当请求的Header中含有Pragma: no-cache或Cache-Control: no-cache时,会跳过缓存直接读取源内容。

` })