From d350c4f6c649e17129613f7b64c051bc8169f210 Mon Sep 17 00:00:00 2001 From: Grzegorz Surmann Date: Tue, 3 Sep 2024 00:59:18 +0200 Subject: [PATCH] small cleanup --- demo.php | 2 +- inc/Class.PHPCACHER.inc.php | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/demo.php b/demo.php index b7c4f53..5da94b0 100644 --- a/demo.php +++ b/demo.php @@ -2,7 +2,7 @@ require_once("inc/Class.PHPCACHER.inc.php"); -$cache = new Cache(); +$cache = new PHPCACHER(); $cache->setPath("./cache"); $cache->setTTL(3600); diff --git a/inc/Class.PHPCACHER.inc.php b/inc/Class.PHPCACHER.inc.php index c1384e7..66828c6 100644 --- a/inc/Class.PHPCACHER.inc.php +++ b/inc/Class.PHPCACHER.inc.php @@ -1,6 +1,11 @@ setTTL(3600); + $this->setPath("./cache"); + return TRUE; + } public function put($item,$data) { file_put_contents($this->fileName($item),serialize($data)); return TRUE; @@ -45,11 +50,3 @@ class PHPCACHER { return TRUE; } } - -class Cache extends PHPCACHER { - function __construct() { - $this->setTTL(3600); - $this->setPath("./cache"); - return TRUE; - } -}