清理缓存
This commit is contained in:
parent
fd3d8bc32e
commit
6704b5b486
@ -34,6 +34,10 @@ func InitFeed() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ClearCache() {
|
||||||
|
postFeedCache.ClearExpired()
|
||||||
|
}
|
||||||
|
|
||||||
func isCacheExpired(c *gin.Context, lastTime time.Time) bool {
|
func isCacheExpired(c *gin.Context, lastTime time.Time) bool {
|
||||||
eTag := helper.StringMd5(lastTime.Format(tmp))
|
eTag := helper.StringMd5(lastTime.Format(tmp))
|
||||||
since := c.Request.Header.Get("If-Modified-Since")
|
since := c.Request.Header.Get("If-Modified-Since")
|
||||||
|
Loading…
Reference in New Issue
Block a user