From ecff1a85f0f234324f22ac5bac5373b9196d313e Mon Sep 17 00:00:00 2001 From: Thorsten Bringewatt <t.bringewatt@mittwald.de> Date: Tue, 24 Nov 2015 14:13:18 +0100 Subject: [PATCH] [TASK] Change APC cache preset condition This commit removes the check for minimum total apc cache size. It should be enough to check for at least 5 MB free memory. Change-Id: Ia8f6d2aaf9030c303534f7c27f2c73479aa4632a Resolves: #71802 Releases: master, 7.6 Reviewed-on: https://review.typo3.org/44929 Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com> Tested-by: Alexander Opitz <opitz.alexander@googlemail.com> Reviewed-by: Benni Mack <benni@typo3.org> Tested-by: Benni Mack <benni@typo3.org> --- .../Configuration/ExtbaseObjectCache/ApcPreset.php | 9 +++------ .../Tool/Configuration/ExtbaseObjectCache/Apc.html | 5 ++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/typo3/sysext/install/Classes/Configuration/ExtbaseObjectCache/ApcPreset.php b/typo3/sysext/install/Classes/Configuration/ExtbaseObjectCache/ApcPreset.php index 018120fbb9a3..f1385082ae3c 100644 --- a/typo3/sysext/install/Classes/Configuration/ExtbaseObjectCache/ApcPreset.php +++ b/typo3/sysext/install/Classes/Configuration/ExtbaseObjectCache/ApcPreset.php @@ -46,8 +46,7 @@ class ApcPreset extends Configuration\AbstractPreset ); /** - * APC preset is available if extension is loaded, if APC has ~100MB - * memory and if ~5MB are free. + * APC preset is available if extension is loaded and at least ~5MB are free. * * @return bool TRUE */ @@ -56,12 +55,10 @@ class ApcPreset extends Configuration\AbstractPreset $result = false; if (extension_loaded('apc')) { $memoryInfo = @apc_sma_info(); - $totalMemory = $memoryInfo['num_seg'] * $memoryInfo['seg_size']; $availableMemory = $memoryInfo['avail_mem']; - // If more than 99MB in total and more than 5MB free - if ($totalMemory > (99 * 1024 * 1024) - && $availableMemory > (5 * 1024 * 1024)) { + // If more than 5MB free + if ($availableMemory > (5 * 1024 * 1024)) { $result = true; } } diff --git a/typo3/sysext/install/Resources/Private/Partials/Action/Tool/Configuration/ExtbaseObjectCache/Apc.html b/typo3/sysext/install/Resources/Private/Partials/Action/Tool/Configuration/ExtbaseObjectCache/Apc.html index d2ec47f4ee89..bd1079e01a70 100644 --- a/typo3/sysext/install/Resources/Private/Partials/Action/Tool/Configuration/ExtbaseObjectCache/Apc.html +++ b/typo3/sysext/install/Resources/Private/Partials/Action/Tool/Configuration/ExtbaseObjectCache/Apc.html @@ -28,9 +28,8 @@ speeds up lots of TYPO3 CMS requests. Use if available. </f:then> <f:else> - APC is not loaded or not enough memory is left. APC should - be configured to have at least 100MB of shared memory with - 5MB free memory. + APCu is not loaded or not enough memory is left. APCu should + have at least 5MB free memory. </f:else> </f:if> </div> -- GitLab