cache lookup debugging
This commit is contained in:
parent
47447ee982
commit
30886b3a69
@ -199,6 +199,9 @@ class MemcacheCache implements CacheEngine {
|
||||
|
||||
public function get($key) {
|
||||
assert(!is_null($key));
|
||||
if((DEBUG_CACHE === true) || (is_null(DEBUG_CACHE) && @$_GET['DEBUG_CACHE'])) {
|
||||
file_put_contents("data/cache.log", "Cache lookup: $key\n", FILE_APPEND);
|
||||
}
|
||||
$val = $this->memcache->get($key);
|
||||
if($val !== false) {
|
||||
$this->hits++;
|
||||
|
@ -24,6 +24,7 @@ _d("DATABASE_KA", true); // string Keep database connection alive
|
||||
_d("CACHE_DSN", null); // string cache connection details
|
||||
_d("DEBUG", false); // boolean print various debugging details
|
||||
_d("DEBUG_SQL", false); // boolean dump SQL queries to data/sql.log
|
||||
_d("DEBUG_CACHE", false); // boolean dump cache queries to data/cache.log
|
||||
_d("COVERAGE", false); // boolean activate xdebug coverage monitor
|
||||
_d("CONTEXT", null); // string file to log performance data into
|
||||
_d("CACHE_HTTP", false); // boolean output explicit HTTP caching headers
|
||||
|
Loading…
x
Reference in New Issue
Block a user