Skip to content

Commit a0a5df3

Browse files
Merge pull request #62266 from nextcloud/backport/62195/stable34
[stable34] chore: undeprecate the redis cache backend
2 parents 8566c11 + 26c91bd commit a0a5df3

8 files changed

Lines changed: 10 additions & 84 deletions

File tree

apps/settings/composer/composer/autoload_classmap.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
'OCA\\Settings\\SetupChecks\\LoggingLevel' => $baseDir . '/../lib/SetupChecks/LoggingLevel.php',
111111
'OCA\\Settings\\SetupChecks\\MaintenanceWindowStart' => $baseDir . '/../lib/SetupChecks/MaintenanceWindowStart.php',
112112
'OCA\\Settings\\SetupChecks\\MemcacheConfigured' => $baseDir . '/../lib/SetupChecks/MemcacheConfigured.php',
113-
'OCA\\Settings\\SetupChecks\\MemcacheLegacy' => $baseDir . '/../lib/SetupChecks/MemcacheLegacy.php',
114113
'OCA\\Settings\\SetupChecks\\MimeTypeMigrationAvailable' => $baseDir . '/../lib/SetupChecks/MimeTypeMigrationAvailable.php',
115114
'OCA\\Settings\\SetupChecks\\MysqlRowFormat' => $baseDir . '/../lib/SetupChecks/MysqlRowFormat.php',
116115
'OCA\\Settings\\SetupChecks\\MysqlUnicodeSupport' => $baseDir . '/../lib/SetupChecks/MysqlUnicodeSupport.php',

apps/settings/composer/composer/autoload_static.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ class ComposerStaticInitSettings
125125
'OCA\\Settings\\SetupChecks\\LoggingLevel' => __DIR__ . '/..' . '/../lib/SetupChecks/LoggingLevel.php',
126126
'OCA\\Settings\\SetupChecks\\MaintenanceWindowStart' => __DIR__ . '/..' . '/../lib/SetupChecks/MaintenanceWindowStart.php',
127127
'OCA\\Settings\\SetupChecks\\MemcacheConfigured' => __DIR__ . '/..' . '/../lib/SetupChecks/MemcacheConfigured.php',
128-
'OCA\\Settings\\SetupChecks\\MemcacheLegacy' => __DIR__ . '/..' . '/../lib/SetupChecks/MemcacheLegacy.php',
129128
'OCA\\Settings\\SetupChecks\\MimeTypeMigrationAvailable' => __DIR__ . '/..' . '/../lib/SetupChecks/MimeTypeMigrationAvailable.php',
130129
'OCA\\Settings\\SetupChecks\\MysqlRowFormat' => __DIR__ . '/..' . '/../lib/SetupChecks/MysqlRowFormat.php',
131130
'OCA\\Settings\\SetupChecks\\MysqlUnicodeSupport' => __DIR__ . '/..' . '/../lib/SetupChecks/MysqlUnicodeSupport.php',

apps/settings/lib/AppInfo/Application.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
use OCA\Settings\SetupChecks\LegacySSEKeyFormat;
4949
use OCA\Settings\SetupChecks\MaintenanceWindowStart;
5050
use OCA\Settings\SetupChecks\MemcacheConfigured;
51-
use OCA\Settings\SetupChecks\MemcacheLegacy;
5251
use OCA\Settings\SetupChecks\MimeTypeMigrationAvailable;
5352
use OCA\Settings\SetupChecks\MysqlRowFormat;
5453
use OCA\Settings\SetupChecks\MysqlUnicodeSupport;
@@ -190,7 +189,6 @@ public function register(IRegistrationContext $context): void {
190189
$context->registerSetupCheck(LegacySSEKeyFormat::class);
191190
$context->registerSetupCheck(MaintenanceWindowStart::class);
192191
$context->registerSetupCheck(MemcacheConfigured::class);
193-
$context->registerSetupCheck(MemcacheLegacy::class);
194192
$context->registerSetupCheck(MimeTypeMigrationAvailable::class);
195193
$context->registerSetupCheck(MysqlRowFormat::class);
196194
$context->registerSetupCheck(MysqlUnicodeSupport::class);

apps/settings/lib/SetupChecks/MemcacheLegacy.php

Lines changed: 0 additions & 59 deletions
This file was deleted.

build/psalm-baseline.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3024,11 +3024,6 @@
30243024
<code><![CDATA[$this->timeFactory->getTime()]]></code>
30253025
</InvalidScalarArgument>
30263026
</file>
3027-
<file src="core/Command/Memcache/RedisCommand.php">
3028-
<DeprecatedClass>
3029-
<code><![CDATA[protected]]></code>
3030-
</DeprecatedClass>
3031-
</file>
30323027
<file src="core/Command/Security/BruteforceAttempts.php">
30333028
<DeprecatedMethod>
30343029
<code><![CDATA[getAttempts]]></code>

config/config.sample.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,9 +1787,16 @@
17871787
* Connection details for the Key-Value store used for in-memory caching,
17881788
* for example when using Valkey or Redis.
17891789
*
1790-
* This is the brand-independent successor of the ``redis`` and
1791-
* ``redis.cluster`` options below and supports the latest Valkey and Redis
1792-
* releases. Three topologies are supported:
1790+
* This is the brand-independent version of the ``redis`` and
1791+
* ``redis.cluster`` options below without depending on ``php-redis``
1792+
* meaning no additional PHP extension needs to be installed.
1793+
* Redis and Valkey 4.0 up to 8.0 are supported, for SSL support Redis v6 or higher is required,
1794+
* Valkey 9 is supported but without support for numbered databased when using cluster mode.
1795+
*
1796+
* Warning: If the cache server is not hosted on the same machine as Nextcloud,
1797+
* this can have a network overhead compared to the ``php-redis`` based backend below.
1798+
*
1799+
* Three topologies are supported:
17931800
* a single server, a Sentinel managed replication set, and a
17941801
* server cluster. Configure exactly one of ``server``, ``sentinel`` or
17951802
* ``seeds``.
@@ -1873,8 +1880,6 @@
18731880
*
18741881
* We also support Redis SSL/TLS encryption as of version 6.
18751882
* See https://redis.io/topics/encryption for more information.
1876-
*
1877-
* @deprecated 34.0.0 use `memcache.kvstore` instead which supports also Valkey.
18781883
*/
18791884
'redis' => [
18801885
'host' => 'localhost', // can also be a Unix domain socket: '/tmp/redis.sock'
@@ -1914,8 +1919,6 @@
19141919
*
19151920
* Authentication works with phpredis version 4.2.1+. See
19161921
* https://github.com/phpredis/phpredis/commit/c5994f2a42b8a348af92d3acb4edff1328ad8ce1
1917-
*
1918-
* @deprecated 34.0.0 use `memcache.kvstore` instead which supports also Valkey.
19191922
*/
19201923
'redis.cluster' => [
19211924
'seeds' => [ // provide some or all of the cluster servers to bootstrap discovery, port required

lib/private/Memcache/Redis.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@
1010
use OCP\IMemcacheTTL;
1111
use OCP\Server;
1212

13-
/**
14-
* @deprecated 34.0.2 Legacy phpredis based backend. Kept so existing `redis`
15-
* and `redis.cluster` configurations keep working. New setups should
16-
* use {@see KeyValueCache} with the `memcache.kvstore` configuration,
17-
* which also supports Valkey.
18-
*/
1913
class Redis extends Cache implements IMemcacheTTL {
2014
/** name => [script, sha1] */
2115
public const LUA_SCRIPTS = [

lib/private/RedisFactory.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99

1010
use OCP\Diagnostics\IEventLogger;
1111

12-
/**
13-
* @deprecated 34.0.2 - use {@see \OC\Memcache\KeyValueCacheFactory} instead
14-
*/
1512
class RedisFactory {
1613
public const REDIS_MINIMAL_VERSION = '4.0.0';
1714
public const REDIS_EXTRA_PARAMETERS_MINIMAL_VERSION = '5.3.0';

0 commit comments

Comments
 (0)