public function cacheMethod($method, $key, $value = null)
{
if ($this->cacheMethods === false) {
return $value;
}
if (!$this->_methodCacheChange && empty(self::$methodCache)) {
self::$methodCache = Cache::read('method_cache', '_cake_core_');
}
if ($value === null) {
return isset(self::$methodCache[$method][$key]) ? self::$methodCache[$method][$key] : null;
}
$this->_methodCacheChange = true;
return self::$methodCache[$method][$key] = $value;
}