缓存策略增加“允许读取不完整的Partial Content”选项

This commit is contained in:
刘祥超
2024-05-07 20:06:06 +08:00
parent b68d92d506
commit 02dc42d8e0
2 changed files with 18 additions and 7 deletions

View File

@@ -1004,6 +1004,11 @@ func (this *FileStorage) CanSendfile() bool {
return this.options.EnableSendfile
}
// Options 获取当前缓存存储的选项
func (this *FileStorage) Options() *serverconfigs.HTTPFileCacheStorage {
return this.options
}
// 获取Key对应的文件路径
func (this *FileStorage) keyPath(key string) (hash string, path string, diskIsFull bool) {
hash = stringutil.Md5(key)