diff --git a/README.txt b/README.txt
index ed048e4..745dd7f 100644
--- a/README.txt
+++ b/README.txt
@@ -11,7 +11,15 @@ entity CRUD controller, which helps simplifying the creation of new entity types
 This is an API module. You only need to enable it if a module depends on it or
 you are interested in using it for development.
 
-This README is for interested developers. If you are not interested in
+Advanced usage:
+---------------
+You can optimize cache clearing performance by setting the variable
+'entity_rebuild_on_flush' to FALSE. This skips rebuilding of feature
+components and exported entities during cache flushing. Instead, it is triggered
+by the features module only; e.g., when features are reverted.
+
+
+The README below is for interested developers. If you are not interested in
 developing, you may stop reading now.
 
 --------------------------------------------------------------------------------
diff --git a/entity.features.inc b/entity.features.inc
index e266aaf..73626c4 100644
--- a/entity.features.inc
+++ b/entity.features.inc
@@ -7,6 +7,12 @@
 
 /**
  * Returns the configured entity features controller.
+ *
+ * @param string $type
+ *   The entity type to get the controller for.
+ *
+ * @return EntityDefaultFeaturesController
+ *   The configured entity features controller.
  */
 function entity_features_get_controller($type) {
   $static = &drupal_static(__FUNCTION__);
@@ -130,6 +136,18 @@ class EntityDefaultFeaturesController {
       }
     }
   }
+
+  /**
+   * Generates the result for hook_features_rebuild().
+   *
+   * @see entity_features_rebuild()
+   * @see entity_features_post_restore()
+   */
+  function rebuild($module = NULL) {
+    // We don't do the rebuild here since a whole rebuild is triggered in
+    // entity_features_post_restore().
+    // entity_defaults_rebuild(array($this->type));
+  }
 }
 
 /**
@@ -146,6 +164,8 @@ function entity_features_api() {
 }
 
 /**
+ * Implements hook_features_export_options().
+ *
  * Features component callback.
  */
 function entity_features_export_options($a1, $a2 = NULL) {
@@ -157,6 +177,8 @@ function entity_features_export_options($a1, $a2 = NULL) {
 }
 
 /**
+ * Implements hook_features_export().
+ *
  * Features component callback.
  */
 function entity_features_export($data, &$export, $module_name = '', $entity_type) {
@@ -164,6 +186,8 @@ function entity_features_export($data, &$export, $module_name = '', $entity_type
 }
 
 /**
+ * Implements hook_features_export_render().
+ *
  * Features component callback.
  */
 function entity_features_export_render($module, $data, $export = NULL, $entity_type) {
@@ -171,8 +195,32 @@ function entity_features_export_render($module, $data, $export = NULL, $entity_t
 }
 
 /**
+ * Implements hook_features_revert().
+ *
  * Features component callback.
  */
 function entity_features_revert($module = NULL, $entity_type) {
   return entity_features_get_controller($entity_type)->revert($module);
 }
+
+/**
+ * Implements hook_features_rebuild().
+ *
+ * Features component callback.
+ */
+function entity_features_rebuild($module = NULL, $entity_type) {
+  return entity_features_get_controller($entity_type)->rebuild($module);
+}
+
+/**
+ * Implements hook_features_post_restore().
+ *
+ * Revert all defaults when a features rebuild is triggered - even the ones not
+ * handled by features itself.
+ */
+function entity_features_post_restore($op, $items = array()) {
+  if ($op == 'rebuild') {
+    // Use features rebuild to rebuild the features independent exports too.
+    entity_defaults_rebuild();
+  }
+}
diff --git a/entity.install b/entity.install
index f6f8cc2..118820b 100644
--- a/entity.install
+++ b/entity.install
@@ -14,6 +14,14 @@ function entity_enable() {
 }
 
 /**
+ * Implements hook_uninstall().
+ */
+function entity_uninstall() {
+  // Delete variables.
+  variable_del('entity_rebuild_on_flush');
+}
+
+/**
  * The entity API modules have been merged into a single module.
  */
 function entity_update_7000() {
diff --git a/entity.module b/entity.module
index d4a882c..4ce6031 100644
--- a/entity.module
+++ b/entity.module
@@ -1076,7 +1076,10 @@ function entity_flush_caches() {
   // case of enabling or disabling modules we already rebuild defaults in
   // entity_modules_enabled() and entity_modules_disabled(), so we do not need
   // to do it again.
-  if (current_path() != 'admin/modules/list/confirm') {
+  // Also check if features has explicitly disabled rebuilding on cache flush.
+  // If the variable is set features is installed and will take care of the re-
+  // build whenever the features page is visited anyway.
+  if (current_path() != 'admin/modules/list/confirm' && variable_get('entity_rebuild_on_flush', TRUE)) {
     entity_defaults_rebuild();
   }
 
diff --git a/views/plugins/entity_views_plugin_row_entity_view.inc b/views/plugins/entity_views_plugin_row_entity_view.inc
index db72b5f..9b4b781 100644
--- a/views/plugins/entity_views_plugin_row_entity_view.inc
+++ b/views/plugins/entity_views_plugin_row_entity_view.inc
@@ -88,6 +88,7 @@ class entity_views_plugin_row_entity_view extends views_plugin_row {
 
   public function render($values) {
     if ($entity = $this->get_value($values)) {
+      $entity->view = $this->view;
       $render = $this->rendered_content[entity_id($this->entity_type, $entity)];
       return drupal_render($render);
     }
