增加是否同步写入压缩缓存设置

This commit is contained in:
刘祥超
2022-02-24 20:12:15 +08:00
parent a73314c12a
commit f147905532
5 changed files with 48 additions and 23 deletions

View File

@@ -36,6 +36,7 @@ func (this *CreatePopupAction) RunPost(params struct {
CapacityJSON []byte CapacityJSON []byte
MaxSizeJSON []byte MaxSizeJSON []byte
MaxKeys int64 MaxKeys int64
SyncCompressionCache bool
Description string Description string
IsOn bool IsOn bool
@@ -98,6 +99,7 @@ func (this *CreatePopupAction) RunPost(params struct {
MaxSizeJSON: params.MaxSizeJSON, MaxSizeJSON: params.MaxSizeJSON,
Type: params.Type, Type: params.Type,
OptionsJSON: optionsJSON, OptionsJSON: optionsJSON,
SyncCompressionCache: params.SyncCompressionCache,
}) })
if err != nil { if err != nil {
this.ErrorPage(err) this.ErrorPage(err)

View File

@@ -60,6 +60,7 @@ func (this *UpdateAction) RunPost(params struct {
CapacityJSON []byte CapacityJSON []byte
MaxSizeJSON []byte MaxSizeJSON []byte
MaxKeys int64 MaxKeys int64
SyncCompressionCache bool
Description string Description string
IsOn bool IsOn bool
@@ -144,6 +145,7 @@ func (this *UpdateAction) RunPost(params struct {
MaxSizeJSON: params.MaxSizeJSON, MaxSizeJSON: params.MaxSizeJSON,
Type: params.Type, Type: params.Type,
OptionsJSON: optionsJSON, OptionsJSON: optionsJSON,
SyncCompressionCache: params.SyncCompressionCache,
}) })
if err != nil { if err != nil {
this.ErrorPage(err) this.ErrorPage(err)

View File

@@ -76,6 +76,13 @@
<p class="comment">可以容纳多少数量的Key0表示不限制。</p> <p class="comment">可以容纳多少数量的Key0表示不限制。</p>
</td> </td>
</tr> </tr>
<tr>
<td>同步写入压缩缓存</td>
<td>
<checkbox name="syncCompressionCache"></checkbox>
<p class="comment">选中后在压缩设置开启的情况下在缓存源站内容的同时也会同步写入压缩缓存不选中表示在源站内容缓存后下一次调用才会缓存压缩内容防止同一时间内硬盘IO负载过高。</p>
</td>
</tr>
<tr> <tr>
<td>描述</td> <td>描述</td>
<td> <td>

View File

@@ -74,6 +74,13 @@
<p class="comment">可以容纳多少数量的Key0表示不限制。</p> <p class="comment">可以容纳多少数量的Key0表示不限制。</p>
</td> </td>
</tr> </tr>
<tr>
<td>同步写入压缩缓存</td>
<td>
<span v-if="cachePolicy.syncCompressionCache" class="green">Y</span>
<span v-else class="disabled">N</span>
</td>
</tr>
<tr> <tr>
<td>描述</td> <td>描述</td>
<td> <td>

View File

@@ -84,6 +84,13 @@
<p class="comment">可以容纳多少数量的Key0表示不限制。</p> <p class="comment">可以容纳多少数量的Key0表示不限制。</p>
</td> </td>
</tr> </tr>
<tr>
<td>同步写入压缩缓存</td>
<td>
<checkbox name="syncCompressionCache" v-model="cachePolicy.syncCompressionCache"></checkbox>
<p class="comment">选中后在压缩设置开启的情况下在缓存源站内容的同时也会同步写入压缩缓存不选中表示在源站内容缓存后下一次调用才会缓存压缩内容防止同一时间内硬盘IO负载过高。</p>
</td>
</tr>
<tr> <tr>
<td>描述</td> <td>描述</td>
<td> <td>