mirror of
				https://github.com/TeaOSLab/EdgeNode.git
				synced 2025-11-04 07:40:56 +08:00 
			
		
		
		
	缓存文件实现Sendfile
This commit is contained in:
		@@ -819,6 +819,14 @@ func (this *FileStorage) IgnoreKey(key string) {
 | 
			
		||||
	this.ignoreKeys.Push(key)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// CanSendfile 是否支持Sendfile
 | 
			
		||||
func (this *FileStorage) CanSendfile() bool {
 | 
			
		||||
	if this.options == nil {
 | 
			
		||||
		return false
 | 
			
		||||
	}
 | 
			
		||||
	return this.options.EnableSendfile
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 绝对路径
 | 
			
		||||
func (this *FileStorage) dir() string {
 | 
			
		||||
	return this.options.Dir + "/p" + strconv.FormatInt(this.policy.Id, 10) + "/"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user