缓存文件实现Sendfile

This commit is contained in:
GoEdgeLab
2022-04-04 19:45:57 +08:00
parent 2df6e5a51b
commit 149ffd400f
7 changed files with 41 additions and 2 deletions

View File

@@ -347,6 +347,11 @@ func (this *MemoryStorage) IgnoreKey(key string) {
this.ignoreKeys.Push(key)
}
// CanSendfile 是否支持Sendfile
func (this *MemoryStorage) CanSendfile() bool {
return false
}
// 计算Key Hash
func (this *MemoryStorage) hash(key string) uint64 {
return xxhash.Sum64String(key)