mirror of
https://github.com/AlistGo/alist.git
synced 2025-06-24 23:12:51 +08:00
🎨 Improve the code structure
This commit is contained in:
16
server/controllers/cache.go
Normal file
16
server/controllers/cache.go
Normal file
@ -0,0 +1,16 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"github.com/Xhofe/alist/conf"
|
||||
"github.com/Xhofe/alist/server/common"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func ClearCache(c *gin.Context) {
|
||||
err := conf.Cache.Clear(conf.Ctx)
|
||||
if err != nil {
|
||||
common.ErrorResp(c, err, 500)
|
||||
} else {
|
||||
common.SuccessResp(c)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user