mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-23 15:10:25 +08:00
清理缓存时也清理HEAD缓存
This commit is contained in:
@@ -351,12 +351,11 @@ func (this *APIStream) handlePurgeCache(message *pb.NodeStreamMessage) error {
|
||||
if msg.Type == "file" {
|
||||
var keys = msg.Keys
|
||||
for _, key := range keys {
|
||||
keys = append(keys, key+webpCacheSuffix)
|
||||
keys = append(keys, key+webpCacheSuffix, key+cacheMethodSuffix+"HEAD")
|
||||
// TODO 根据实际缓存的内容进行组合
|
||||
for _, encoding := range compressions.AllEncodings() {
|
||||
keys = append(keys, key+compressionCacheSuffix+encoding)
|
||||
keys = append(keys, key+webpCacheSuffix+compressionCacheSuffix+encoding)
|
||||
keys = append(keys, key+cacheMethodSuffix+"HEAD")
|
||||
}
|
||||
}
|
||||
msg.Keys = keys
|
||||
|
||||
Reference in New Issue
Block a user