mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-22 23:05:18 -04:00
Overload ORM_Iterator to cache models as we pull them out of the
result set. This allows us to see the cache and avoid further lookups.
This commit is contained in:
@@ -31,4 +31,10 @@ class model_cache_Core {
|
||||
|
||||
return self::$cache->$model_name->$field_name->$id;
|
||||
}
|
||||
|
||||
static function set($model) {
|
||||
self::$cache->{$model->object_name}
|
||||
->{$model->primary_key}
|
||||
->{$model->{$model->primary_key}} = $model;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user