25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

88 satır
3.0 KiB

  1. <title>更新缓存</title>
  2. <div class="layui-card layadmin-header">
  3. <div class="layui-breadcrumb" lay-filter="breadcrumb">
  4. <a lay-href="">主页</a>
  5. <a><cite>安全维护</cite></a>
  6. <a><cite>更新缓存</cite></a>
  7. </div>
  8. </div>
  9. <div class="layui-fluid">
  10. <div class="layui-row layui-col-space15">
  11. <div class="layui-col-md12">
  12. <div class="layui-card">
  13. <div class="layui-card-header">更新缓存</div>
  14. <div class="layui-card-body" pad15>
  15. <form class="layui-form" wid100 lay-filter="LAY-info-form">
  16. <div class="layui-fields">
  17. </div>
  18. <div class="layui-submit">
  19. <div class="layui-form-item">
  20. <div class="layui-input-block">
  21. <button class="layui-btn" lay-submit lay-filter="submit">确认执行</button>
  22. </div>
  23. </div>
  24. </div>
  25. </form>
  26. </div>
  27. </div>
  28. </div>
  29. </div>
  30. </div>
  31. <script>
  32. var config;
  33. config = {
  34. api: {
  35. submit: '/manage/system/cache/clear.json'
  36. },
  37. submit: function (obj) {
  38. layui.admin.req({
  39. url: config.api.submit,
  40. data: obj.field,
  41. method: 'POST',
  42. success: function (res) {
  43. layui.admin.tip('更新缓存成功');
  44. return false;
  45. }
  46. });
  47. return false;
  48. },
  49. fields: [
  50. {
  51. name: '模板缓存',
  52. key: 'type',
  53. type: 'checkbox',
  54. extra: 'template:更新模板缓存',
  55. value: 'template',
  56. intro: '解决模板修改后由于缓存导致模板未及时更新,特别是修改头尾公共文件不是所有页面都生效'
  57. },
  58. {
  59. name: '配置缓存',
  60. key: 'type',
  61. type: 'checkbox',
  62. extra: 'config:更新配置缓存',
  63. value: 'config',
  64. intro: '解决配置修改后由于缓存导致未生效的问题'
  65. },
  66. {
  67. name: 'PHP缓存',
  68. key: 'type',
  69. type: 'checkbox',
  70. extra: 'php:更新PHP缓存',
  71. value: 'php',
  72. intro: 'opcache开启时会导致刚升级完成后页面未及时生效'
  73. },
  74. {
  75. name: '内存缓存',
  76. key: 'type',
  77. type: 'checkbox',
  78. extra: 'mem:清空内存缓存',
  79. value: '',
  80. intro: '慎重,清空后再次获取需要较长时间,并会造成较大压力',
  81. },
  82. ],
  83. };
  84. layui.use('curd/addOrEdit', layui.factory('curd/addOrEdit'));
  85. </script>