文件缓存策略支持二级缓存(内存 | 文件)

This commit is contained in:
刘祥超
2021-03-02 19:43:05 +08:00
parent a1e93303f9
commit 417ce60ca2
9 changed files with 145 additions and 22 deletions

View File

@@ -215,6 +215,7 @@ func (this *HTTPWriter) Close() {
err := this.cacheWriter.Close()
if err == nil {
this.cacheStorage.AddToList(&caches.Item{
Type: this.cacheWriter.ItemType(),
Key: this.cacheWriter.Key(),
ExpiredAt: this.cacheWriter.ExpiredAt(),
HeaderSize: this.cacheWriter.HeaderSize(),