updatecache.ctrl.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * [WeEngine System] Copyright (c) 2014 WE7.CC
  4. * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
  5. */
  6. defined('IN_IA') or exit('Access Denied');
  7. load()->model('cache');
  8. load()->model('setting');
  9. load()->object('cloudapi');
  10. $_W['page']['title'] = '更新缓存 - 设置 - 系统管理';
  11. if (checksubmit('submit', true)) {
  12. $cloud_api = new CloudApi();
  13. $cloud_cache_key = array(
  14. 'key' => array(cache_system_key('module:all_uninstall'), cache_system_key('user_modules:' . $_W['uid']))
  15. );
  16. $cloud_api->post('cache', 'delete', $cloud_cache_key);
  17. $account_ticket_cache = cache_read('account:ticket');
  18. pdo_delete('core_cache');
  19. cache_clean();
  20. cache_write('account:ticket', $account_ticket_cache);
  21. unset($account_ticket_cache);
  22. cache_build_template();
  23. cache_build_users_struct();
  24. cache_build_module_status();
  25. cache_build_cloud_upgrade_module();
  26. cache_build_setting();
  27. cache_build_frame_menu();
  28. cache_build_module_subscribe_type();
  29. cache_build_cloud_ad();
  30. iajax(0, '更新缓存成功!', '');
  31. }
  32. template('system/updatecache');