mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-02 12:26:36 +08:00
优化网盘图片读取逻辑
优化网盘图片读取逻辑
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user