CacheLogic.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | likeadmin快速开发前后端分离管理后台(PHP版)
  4. // +----------------------------------------------------------------------
  5. // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
  6. // | 开源版本可自由商用,可去除界面版权logo
  7. // | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
  8. // | github下载:https://github.com/likeshop-github/likeadmin
  9. // | 访问官网:https://www.likeadmin.cn
  10. // | likeadmin团队 版权所有 拥有最终解释权
  11. // +----------------------------------------------------------------------
  12. // | author: likeadminTeam
  13. // +----------------------------------------------------------------------
  14. namespace app\adminapi\logic\setting\system;
  15. use app\common\logic\BaseLogic;
  16. use think\facade\Cache;
  17. /**
  18. * 系统缓存逻辑
  19. * Class CacheLogic
  20. * @package app\adminapi\logic\setting\system
  21. */
  22. class CacheLogic extends BaseLogic
  23. {
  24. /**
  25. * @notes 清楚系统缓存
  26. * @author 段誉
  27. * @date 2022/4/8 16:29
  28. */
  29. public static function clear()
  30. {
  31. Cache::clear();
  32. del_target_dir(app()->getRootPath().'runtime/file',true);
  33. }
  34. }