Index: content.module
===================================================================
--- content.module	(revision 4490)
+++ content.module	(working copy)
@@ -1314,18 +1314,29 @@
  * info to avoid foreach errors elsewhere in the code.
  */
 function content_types($type_name = NULL) {
+  static $types;
+  global $language;
   // handle type name with either an underscore or a dash
   $type_name = !empty($type_name) ? str_replace('-', '_', $type_name) : NULL;
 
-  $info = _content_type_info();
-  if (isset($info['content types'])) {
-    if (!isset($type_name)) {
-      return $info['content types'];
+  if (isset($type_name) && !isset($types[$type_name])) {
+    $cid = "content_type_info:$type_name:$language->language";
+    if ($cached = cache_get($cid, content_cache_tablename())){
+      $types[$type_name] = $cached->data;
     }
-    if (isset($info['content types'][$type_name])) {
-      return $info['content types'][$type_name];
+    else {
+      $info = _content_type_info();
+      if (isset($info['content types'][$type_name])) {
+        $types[$type_name] = $info['content types'][$type_name];
+        cache_set($cid, $info['content types'][$type_name], content_cache_tablename());
+      }
     }
   }
+  if (!isset($type_name)) {
+    $info = _content_type_info();
+    return $info['content types'];
+  }
+
   return array('tables' => array(), 'fields' => array(), 'extra' => array());
 }
 
@@ -1363,16 +1374,40 @@
  * Return a list of field types.
  */
 function _content_field_types() {
-  $info = _content_type_info();
-  return isset($info['field types']) ? $info['field types'] : array();
+  static $field_types;
+  global $language;
+  if (!isset($field_types)) {
+    $cid = 'content_type_info:field_types' . $language->language;
+    if ($cached = cache_get($cid, content_cache_tablename())) {
+      $field_types = $cached->data;
+    }
+    else {
+      $info = _content_type_info();
+      $field_types = isset($info['field types']) ? $info['field types'] : array();
+      cache_set($cid, $field_types, content_cache_tablename());
+    }
+  }
+  return $field_types;
 }
 
 /**
  * Return a list of widget types.
  */
 function _content_widget_types() {
-  $info = _content_type_info();
-  return isset($info['widget types']) ? $info['widget types'] : array();
+  static $widget_types;
+  global $language;
+  if (!isset($widget_types)) {
+    $cid = 'content_type_info:widget_types:' . $language->language;
+    if ($cached = cache_get($cid, content_cache_tablename())) {
+      $widget_types = $cached->data;
+    }
+    else {
+      $info = _content_type_info();
+      $widget_types = isset($info['widget types']) ? $info['widget types'] : array();
+      cache_set($cid, $widget_types, content_cache_tablename());
+    }
+  }
+  return $widget_types;
 }
 
 /**
