This commit is contained in:
wolfcode
2023-06-15 16:18:27 +08:00
parent cd75078cee
commit e1c3216904
615 changed files with 49493 additions and 1 deletions

View File

@@ -0,0 +1,50 @@
<?php
namespace app\admin\service;
use think\facade\Cache;
class TriggerService
{
/**
* 更新菜单缓存
* @param null $adminId
* @return bool
*/
public static function updateMenu($adminId = null)
{
if(empty($adminId)){
Cache::tag('initAdmin')->clear();
}else{
Cache::delete('initAdmin_' . $adminId);
}
return true;
}
/**
* 更新节点缓存
* @param null $adminId
* @return bool
*/
public static function updateNode($adminId = null)
{
if(empty($adminId)){
Cache::tag('authNode')->clear();
}else{
Cache::delete('allAuthNode_' . $adminId);
}
return true;
}
/**
* 更新系统设置缓存
* @return bool
*/
public static function updateSysconfig()
{
Cache::tag('sysconfig')->clear();
return true;
}
}