flushMethodCache not working if called before cacheMethod

When calling flushMethodCache it correctly empties self::$methodCache but if cacheMethod is called afterwards self::$methodCache gets populated with data from the Cache.
This commit is contained in:
ovidiupruteanu 2013-09-12 22:02:39 +03:00
parent 8f2bd51834
commit f416a321c7

View file

@ -771,7 +771,7 @@ class DboSource extends DataSource {
if ($this->cacheMethods === false) {
return $value;
}
if (empty(self::$methodCache)) {
if (!$this->_methodCacheChange && empty(self::$methodCache)) {
self::$methodCache = Cache::read('method_cache', '_cake_core_');
}
if ($value === null) {