DbObject: allow to clear all caches
This commit is contained in:
parent
172bdd6f6b
commit
6178ca8320
|
@ -1075,6 +1075,13 @@ abstract class DbObject
|
||||||
unset(self::$prefetchStats[$class]);
|
unset(self::$prefetchStats[$class]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function clearAllPrefetchCaches()
|
||||||
|
{
|
||||||
|
self::$prefetched = array();
|
||||||
|
self::$prefetchedNames = array();
|
||||||
|
self::$prefetchStats = array();
|
||||||
|
}
|
||||||
|
|
||||||
public static function exists($id, DbConnection $connection)
|
public static function exists($id, DbConnection $connection)
|
||||||
{
|
{
|
||||||
if (static::getPrefetched($id)) {
|
if (static::getPrefetched($id)) {
|
||||||
|
|
Loading…
Reference in New Issue