Skip to content
Snippets Groups Projects
Commit 0647ab15 authored by Christian Spoo's avatar Christian Spoo Committed by Stefan B�rk
Browse files

[BUGFIX] Properly set memcache/memcached in cache backend

parent::__construct() of MemcachedBackend calls
setCompression() which determines compression based
on state of $this->usePeclModule. This property needs
to be set before parent::__construct() is called.

Resolves: #99495
Releases: main, 12.4, 11.5
Change-Id: Ibc6c3a2378c5187748b4394d440232600de193e2
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80387


Tested-by: default avatarStefan B�rk <stefan@buerk.tech>
Reviewed-by: default avatarStefan B�rk <stefan@buerk.tech>
Tested-by: default avatarcore-ci <typo3@b13.com>
parent ff2a7883
Branches
Tags
No related merge requests found
......@@ -99,9 +99,6 @@ class MemcachedBackend extends AbstractBackend implements TaggableBackendInterfa
if (!extension_loaded('memcache') && !extension_loaded('memcached')) {
throw new Exception('The PHP extension "memcache" or "memcached" must be installed and loaded in order to use the Memcached backend.', 1213987706);
}
parent::__construct($context, $options);
if ($this->usedPeclModule === '') {
if (extension_loaded('memcache')) {
$this->usedPeclModule = 'memcache';
......@@ -109,6 +106,7 @@ class MemcachedBackend extends AbstractBackend implements TaggableBackendInterfa
$this->usedPeclModule = 'memcached';
}
}
parent::__construct($context, $options);
}
/**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment