清理缓存时也清理HEAD缓存

This commit is contained in:
刘祥超
2022-02-22 21:52:28 +08:00
parent 03ce082926
commit 83f581f7f0
3 changed files with 2 additions and 8 deletions

View File

@@ -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