log sets and deletes in CACHE_DEBUG mode
This commit is contained in:
parent
4d6e6ade1c
commit
5ab8f9e5e2
1 changed files with 6 additions and 0 deletions
|
@ -318,6 +318,9 @@ class MemcacheCache implements CacheEngine {
|
||||||
public function set($key, $val, $time=0) {
|
public function set($key, $val, $time=0) {
|
||||||
assert(!is_null($key));
|
assert(!is_null($key));
|
||||||
$this->memcache->set($key, $val, false, $time);
|
$this->memcache->set($key, $val, false, $time);
|
||||||
|
if((DEBUG_CACHE === true) || (is_null(DEBUG_CACHE) && @$_GET['DEBUG_CACHE'])) {
|
||||||
|
file_put_contents("data/cache.log", "Cache set: $key ($time)\n", FILE_APPEND);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -326,6 +329,9 @@ class MemcacheCache implements CacheEngine {
|
||||||
public function delete($key) {
|
public function delete($key) {
|
||||||
assert(!is_null($key));
|
assert(!is_null($key));
|
||||||
$this->memcache->delete($key);
|
$this->memcache->delete($key);
|
||||||
|
if((DEBUG_CACHE === true) || (is_null(DEBUG_CACHE) && @$_GET['DEBUG_CACHE'])) {
|
||||||
|
file_put_contents("data/cache.log", "Cache delete: $key\n", FILE_APPEND);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Reference in a new issue