From 8fb4db8914db03b3c6a0589ba8fd807574fdb027 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Sat, 8 Oct 2016 16:21:00 +0200 Subject: [PATCH] [index] Introduce CACHE_DIR --- index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 599135a..fba2167 100644 --- a/index.php +++ b/index.php @@ -19,6 +19,9 @@ define('PROXY_NAME', 'Hidden Proxy Name'); date_default_timezone_set('UTC'); error_reporting(0); +// Specify directory for cached files (using FileCache) +define('CACHE_DIR', __DIR__ . '/cache'); + /* Create a file named 'DEBUG' for enabling debug mode. For further security, you may put whitelisted IP addresses @@ -130,7 +133,7 @@ try { // Initialize cache $cache = Cache::create('FileCache'); - $cache->setPath(__DIR__ . '/cache'); + $cache->setPath(CACHE_DIR); $cache->purgeCache(86400); // 24 hours $cache->setParameters($params);