diff --git a/.gitignore b/.gitignore index b4821ed..596842b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,9 @@ config/config.php prototypes/ admin/ -cache/localhost + +cache/ +!/cache/.htaccess # PhpStorm .idea/ diff --git a/api/status.php b/api/status.php index d283a84..783012d 100644 --- a/api/status.php +++ b/api/status.php @@ -11,7 +11,7 @@ date_default_timezone_set($config["general"]["timezone"]); $cacheutils = new CacheUtils('serverstatus'); if($cacheutils->isExpired()) { - $cacheutils->setValue(getResult(), 10); + $cacheutils->setValue(getResult(), 60); } die ($cacheutils->getValue()); diff --git a/cache/.gitkeep b/cache/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/include/cacheutils.class.php b/include/cacheutils.class.php index 849bdb0..a8c1852 100644 --- a/include/cacheutils.class.php +++ b/include/cacheutils.class.php @@ -1,5 +1,6 @@ cacheInstance = CacheManager::getInstance('Files', ["path" => __DIR__ . '/../cache']); Languages::setEncoding(); $this->cacheItem = $this->cacheInstance->getItem($key); @@ -46,4 +51,4 @@ class CacheUtils { $this->cacheInstance->deleteItem($this->key); } -} +} \ No newline at end of file diff --git a/include/footer.php b/include/footer.php index 90884e7..2b9a2a6 100644 --- a/include/footer.php +++ b/include/footer.php @@ -12,7 +12,7 @@