small cleanup
This commit is contained in:
parent
e63d73953f
commit
d350c4f6c6
2
demo.php
2
demo.php
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
require_once("inc/Class.PHPCACHER.inc.php");
|
require_once("inc/Class.PHPCACHER.inc.php");
|
||||||
|
|
||||||
$cache = new Cache();
|
$cache = new PHPCACHER();
|
||||||
$cache->setPath("./cache");
|
$cache->setPath("./cache");
|
||||||
$cache->setTTL(3600);
|
$cache->setTTL(3600);
|
||||||
|
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
class PHPCACHER {
|
class PHPCACHER {
|
||||||
|
function __construct() {
|
||||||
|
$this->setTTL(3600);
|
||||||
|
$this->setPath("./cache");
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
public function put($item,$data) {
|
public function put($item,$data) {
|
||||||
file_put_contents($this->fileName($item),serialize($data));
|
file_put_contents($this->fileName($item),serialize($data));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -45,11 +50,3 @@ class PHPCACHER {
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Cache extends PHPCACHER {
|
|
||||||
function __construct() {
|
|
||||||
$this->setTTL(3600);
|
|
||||||
$this->setPath("./cache");
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user