优化网盘图片读取逻辑

优化网盘图片读取逻辑
This commit is contained in:
truewhile
2026-08-21 22:21:14 +08:00
parent cbe0d7e88f
commit 0bcb1fec87
4 changed files with 10 additions and 29 deletions
+2 -7
View File
@@ -132,14 +132,9 @@ func imageFileETag(key string, stat os.FileInfo) string {
}
func freshNegativeImageCache(failPath string) bool {
stat, err := os.Stat(failPath)
if err != nil {
return false
if _, err := os.Stat(failPath); err == nil {
_ = os.Remove(failPath)
}
if time.Since(stat.ModTime()) < imageNegativeCacheTTL {
return true
}
_ = os.Remove(failPath)
return false
}