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:
Bharat Mediratta
2009-05-14 01:19:05 +00:00
parent 96d59caa3b
commit f439fe96c8
2 changed files with 20 additions and 0 deletions
+6
View File
@@ -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;
}
}