From 23994df00ceeeb70e78e29d87a589dfb76e98b82 Mon Sep 17 00:00:00 2001 From: Wruczek Date: Thu, 30 Mar 2017 00:57:06 +0200 Subject: [PATCH] v 1.4.2 - Extended status cache time from 10 to 60 seconds. Query should be less spammy now. - Fixed "It is not safe to rely on the system's timezone settings" exception - Removed lang property from html tag --- .gitignore | 4 +++- api/status.php | 2 +- cache/.gitkeep | 0 include/cacheutils.class.php | 9 +++++++-- include/footer.php | 2 +- include/header.php | 2 +- include/modulecheck.php | 2 +- 7 files changed, 14 insertions(+), 7 deletions(-) delete mode 100644 cache/.gitkeep 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 @@