diff --git a/entity.install b/entity.install
index 2a992e9..a77e952 100644
--- a/entity.install
+++ b/entity.install
@@ -26,3 +26,38 @@ function entity_update_7001() {
 function entity_update_7002() {
   // Do nothing, update.php clears cache for us in case there is an update.
 }
+
+/**
+ * Create cache tables for entities that support Entity cache module.
+ */
+function entity_update_7003() {
+  // For uninstallation of modules, we need to keep a list of tables we created
+  // per module providing the entity type.
+  $tables_created = variable_get('entity_cache_tables_created');
+  // Because entity_get_info() does not track which module provides which entity
+  // type, we cannot use it directly.
+  // @see entity_modules_uninstalled()
+  $modules = module_list();
+  foreach ($modules as $module) {
+    if ($module_entity_info = module_invoke($module, 'entity_info')) {
+      foreach ($module_entity_info as $entity_type => $entity_info) {
+        // @see entity_modules_installed()
+        if (
+          // The following two conditions duplicate entity_crud_get_info(), but
+          // re-using that would require array intersecting.
+          isset($entity_info['controller class']) &&
+          in_array('EntityAPIControllerInterface', class_implements($entity_info['controller class'])) &&
+          !empty($entity_info['entity cache']) &&
+          // Do not break modules that create the cache tables for themselves.
+          db_table_exists('cache_entity_' . $entity_type)
+        ) {
+          $schema = drupal_get_schema_unprocessed('system', 'cache');
+          $schema['description'] = 'Cache table used to store' . $entity_type . ' entity records.';
+          db_create_table('cache_entity_' . $entity_type, $schema);
+          $tables_created[$module][] = 'cache_entity_' . $entity_type;
+        }
+      }
+    }
+  }
+  variable_set('entity_cache_tables_created', $tables_created);
+}
\ No newline at end of file
diff --git a/entity.module b/entity.module
index 81ad379..4737d5d 100644
--- a/entity.module
+++ b/entity.module
@@ -843,6 +843,77 @@ function _entity_defaults_rebuild($entity_type) {
 }
 
 /**
+ * Implements hook_modules_installed().
+ */
+function entity_modules_installed($modules) {
+  // entitycache.module does not create cache tables for supporting entities
+  // automatically, so we need to.
+  $entity_api_types = array_keys(entity_crud_get_info());
+
+  // In hook_modules_uninstalled(), we cannot call the
+  // hook_entity_info() implementations in the uninstalled modules.
+  // Therefore, we need to track the tables we created manually.
+  $tables_created = variable_get('entity_cache_tables_created');
+
+  foreach($modules as $module) {
+    if ($module_entity_info = module_invoke($module, 'entity_info')) {
+      foreach ($module_entity_info as $entity_type => $entity_info) {
+        if (
+          // The following two conditions duplicate entity_crud_get_info(), but
+          // re-using that would require array intersecting.
+          isset($entity_info['controller class']) &&
+          in_array('EntityAPIControllerInterface', class_implements($entity_info['controller class'])) &&
+          !empty($entity_info['entity cache']) &&
+          // Do not break modules that create the cache tables for themselves.
+          db_table_exists('cache_entity_' . $entity_type)
+        ) {
+          $schema = drupal_get_schema_unprocessed('system', 'cache');
+          $schema['description'] = 'Cache table used to store' . $entity_type . ' entity records.';
+          db_create_table('cache_entity_' . $entity_type, $schema);
+          $tables_created[$module][] = 'cache_entity_' . $entity_type;
+        }
+      }
+    }
+  }
+
+  variable_set('entity_cache_tables_created', $tables_created);
+}
+
+/**
+ * Implements hook_modules_uninstalled().
+ */
+function entity_modules_uninstalled($modules) {
+  $tables_created = variable_get('entity_cache_tables_created');
+  foreach($modules as $module) {
+    if (!empty($tables_created[$module])) {
+      foreach ($tables_created[$module] as $table) {
+        db_drop_table($table);
+      }
+    }
+  }
+}
+
+/**
+ * Fetches entity info about entities that support caching from specific modules.
+ */
+function _entity_crud_cache_get_info($modules) {
+  $info = array();
+  $entity_api_types = array_keys(entity_crud_get_info());
+  foreach($modules as $module) {
+    if ($module_entity_info = module_invoke($module, 'entity_info')) {
+      if ($module_entity_api_types = array_intersect_key($module_entity_info, array_reverse($entity_api_types))) {
+        foreach ($module_entity_api_types as $entity_type => $entity_info) {
+          if (!empty($entity_info['entity cache'])) {
+            $info[$entity_type] = $entity_info;
+          }
+        }
+      }
+    }
+  }
+  return $info;
+}
+
+/**
  * Implements hook_modules_enabled().
  */
 function entity_modules_enabled($modules) {
