From 27ccbc3d9e5e5f09b8312ddc71f7b34e2a34ab48 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 7 Sep 2020 20:40:17 +0900 Subject: [PATCH] Automatically use APC if available when installing --- common/defaults/config.php | 3 +++ modules/install/install.controller.php | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/common/defaults/config.php b/common/defaults/config.php index 7972452de..bbcb6c1b3 100644 --- a/common/defaults/config.php +++ b/common/defaults/config.php @@ -21,6 +21,9 @@ return array( ), ), 'cache' => array( + 'type' => null, + 'ttl' => 86400, + 'servers' => array(), 'truncate_method' => 'delete', ), 'ftp' => array( diff --git a/modules/install/install.controller.php b/modules/install/install.controller.php index 6d62d5578..558aea2fe 100644 --- a/modules/install/install.controller.php +++ b/modules/install/install.controller.php @@ -252,6 +252,12 @@ class installController extends install Rhymix\Framework\Config::set('lock.allow', array('127.0.0.1', $user_ip_range)); } + // Use APC cache if available. + if (function_exists('apcu_exists')) + { + Rhymix\Framework\Config::set('cache.type', 'apc'); + } + // Save the new configuration. Rhymix\Framework\Config::save();