diff --git a/core/database.class.php b/core/database.class.php index da68d598..4c025839 100644 --- a/core/database.class.php +++ b/core/database.class.php @@ -318,6 +318,9 @@ class MemcacheCache implements CacheEngine { public function set($key, $val, $time=0) { assert(!is_null($key)); $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) { assert(!is_null($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); + } } /**