清理缓存

This commit is contained in:
xing 2022-10-07 23:16:25 +08:00
parent fd3d8bc32e
commit 6704b5b486
2 changed files with 5 additions and 0 deletions

View File

@ -34,6 +34,10 @@ func InitFeed() {
}
}
func ClearCache() {
postFeedCache.ClearExpired()
}
func isCacheExpired(c *gin.Context, lastTime time.Time) bool {
eTag := helper.StringMd5(lastTime.Format(tmp))
since := c.Request.Header.Get("If-Modified-Since")

View File

@ -44,6 +44,7 @@ func cronClearCache() {
case <-t.C:
common.ClearCache()
plugins.ClearDigestCache()
actions.ClearCache()
}
}
}