Index: openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl,v diff -u -r1.78 -r1.79 --- openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl 8 Apr 2009 11:04:56 -0000 1.78 +++ openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl 21 Apr 2009 12:51:32 -0000 1.79 @@ -410,15 +410,17 @@ } ::xo::db::Class ad_proc get_object_type { - -id:required + -id:integer,required } { Return the object type for the give id. @return object_type, typically an XOTcl class } { - db_1row [my qn get_class] \ - "select object_type from acs_objects where object_id=$id" - return $object_type + return [ns_cache eval xotcl_object_type_cache $id { + db_1row [my qn get_class] "select object_type from acs_objects where object_id=$id" + db_1row [my qn get_class] "select object_type from acs_objects where object_id=$id" + return $object_type + }] } ::xo::db::Class ad_proc get_instance_from_db {