public function __destruct() { if ($this->_methodCacheChange) { Cache::write('method_cache', self::$methodCache, '_cake_core_'); } }