fixes needed
This commit is contained in:
parent
673c022e71
commit
3036974d3e
@ -2,6 +2,8 @@
|
||||
|
||||
class PHPCACHER {
|
||||
static function isCached($item) {
|
||||
global $phpcacher_ttl;
|
||||
global $phpcacher_path;
|
||||
if ( !isset($phpcacher_ttl) ) { $phpcacher_ttl=3600; };
|
||||
if ( !isset($phpcacher_path) ) { $phpcacher_path="./cache"; };
|
||||
$file=$phpcacher_path."/".md5($item).".data";
|
||||
@ -10,6 +12,8 @@ class PHPCACHER {
|
||||
}
|
||||
}
|
||||
static function isValid($item) {
|
||||
global $phpcacher_ttl;
|
||||
global $phpcacher_path;
|
||||
if ( !isset($phpcacher_ttl) ) { $phpcacher_ttl=3600; };
|
||||
if ( !isset($phpcacher_path) ) { $phpcacher_path="./cache"; };
|
||||
$file=$phpcacher_path."/".md5($item).".data";
|
||||
@ -18,6 +22,7 @@ class PHPCACHER {
|
||||
}
|
||||
}
|
||||
static function put($item,$data) {
|
||||
global $phpcacher_path;
|
||||
if ( !isset($phpcacher_path) ) { $phpcacher_path="./cache"; };
|
||||
@mkdir($phpcacher_path,0755,TRUE);
|
||||
$file=$phpcacher_path."/".md5($item).".data";
|
||||
@ -25,6 +30,8 @@ class PHPCACHER {
|
||||
return TRUE;
|
||||
}
|
||||
static function get($item) {
|
||||
global $phpcacher_ttl;
|
||||
global $phpcacher_path;
|
||||
if ( !isset($phpcacher_ttl) ) { $phpcacher_ttl=3600; };
|
||||
if ( !isset($phpcacher_path) ) { $phpcacher_path="./cache"; };
|
||||
$file=$phpcacher_path."/".md5($item).".data";
|
||||
@ -36,6 +43,7 @@ class PHPCACHER {
|
||||
return FALSE;
|
||||
}
|
||||
static function del($item) {
|
||||
global $phpcacher_path;
|
||||
if ( !isset($phpcacher_path) ) { $phpcacher_path="./cache"; };
|
||||
$file=$phpcacher_path."/".md5($item).".data";
|
||||
if ( self::isCached($item) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user