浏览代码

Stops the page from cache (relates to #36)

Andrew Collington 6 年之前
父节点
当前提交
0681b84dfa
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      index.php

+ 4 - 2
index.php

@@ -13,7 +13,6 @@ namespace OpcacheGui;
  * @license MIT, http://acollington.mit-license.org/
  */
 
-
 /*
  * User configuration
  */
@@ -42,9 +41,12 @@ if (!extension_loaded('Zend OPcache')) {
 
 $ocEnabled = ini_get('opcache.enable');
 if (empty($ocEnabled)) {
-    die('The Zend OPcache extension is installed but not turned on');
+    die('The Zend OPcache extension is installed but not active');
 }
 
+header('Cache-Control: no-cache, must-revalidate');
+header('Pragma: no-cache');
+
 class OpCacheService
 {
     protected $data;