clear cache

This commit is contained in:
微凉
2021-11-01 22:42:24 +08:00
parent 6313939e8c
commit 5c2ce5b442
6 changed files with 49 additions and 11 deletions

15
server/cache.go Normal file
View File

@ -0,0 +1,15 @@
package server
import (
"github.com/Xhofe/alist/conf"
"github.com/gofiber/fiber/v2"
)
func ClearCache(ctx *fiber.Ctx) error {
err := conf.Cache.Clear(conf.Ctx)
if err != nil {
return ErrorResp(ctx,err,500)
}else {
return SuccessResp(ctx)
}
}