mirror of
https://github.com/tiger1103/gfast.git
synced 2026-09-21 02:04:07 +00:00
清除缓存功能
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* @desc:缓存处理
|
||||
* @company:云南省奇讯科技有限公司
|
||||
* @Author: yixiaohu
|
||||
* @Date: 2021/9/13 14:33
|
||||
*/
|
||||
|
||||
package api
|
||||
|
||||
import (
|
||||
"gfast/app/common/api"
|
||||
"gfast/app/common/global"
|
||||
commService "gfast/app/common/service"
|
||||
"github.com/gogf/gf/net/ghttp"
|
||||
)
|
||||
|
||||
type cache struct {
|
||||
api.CommonBase
|
||||
}
|
||||
|
||||
var Cache = new(cache)
|
||||
|
||||
// Clear 清除缓存
|
||||
func (c *cache) Clear(r *ghttp.Request) {
|
||||
cs := commService.Cache.New()
|
||||
cs.RemoveByTag(global.SysAuthTag)
|
||||
cs.RemoveByTag(global.SysDictTag)
|
||||
cs.RemoveByTag(global.SysConfigTag)
|
||||
c.SusJsonExit(r, "缓存清除成功")
|
||||
}
|
||||
Reference in New Issue
Block a user