DbObject: allow to clear all caches

This commit is contained in:
Thomas Gelf 2016-06-30 12:07:33 +02:00
parent 172bdd6f6b
commit 6178ca8320
1 changed files with 7 additions and 0 deletions

View File

@ -1075,6 +1075,13 @@ abstract class DbObject
unset(self::$prefetchStats[$class]);
}
public static function clearAllPrefetchCaches()
{
self::$prefetched = array();
self::$prefetchedNames = array();
self::$prefetchStats = array();
}
public static function exists($id, DbConnection $connection)
{
if (static::getPrefetched($id)) {