From 7c967e4510036fdbc3f2764e7acedd947a1c2821 Mon Sep 17 00:00:00 2001
From: markpavlitski <markpavlitski@gmail.com>
Date: Fri, 3 May 2013 11:45:28 +0100
Subject: [PATCH] Issue 1985084 by markpavlitski: Set sensible performance
 defaults in the standard install profile.

---
 core/profiles/standard/standard.install | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/core/profiles/standard/standard.install b/core/profiles/standard/standard.install
index 741f857..01fdf44 100644
--- a/core/profiles/standard/standard.install
+++ b/core/profiles/standard/standard.install
@@ -148,4 +148,18 @@ function standard_install() {
   theme_enable(array('seven'));
   config('system.theme')->set('admin', 'seven')->save();
   variable_set('node_admin_theme', '1');
+
+  // Set sensible performance defaults.
+  $system_performance = config('system.performance');
+  // Set the max-age cache header to 1 day.
+  $system_performance->set('cache.page.max_age', 86400);
+  // Turn on the internal page cache. Basic users won't have a reverse proxy
+  // and advanced users will know how to turn this off.
+  $system_performance->set('cache.page.use_internal', 1);
+  // Optimize CSS and JavaScript files.
+  $system_performance->set('css.preprocess', 1);
+  $system_performance->set('js.preprocess', 1);
+  // Turn on page compression.
+  $system_performance->set('response.gzip', 1);
+  $system_performance->save();
 }
-- 
1.8.1.2

