Skip to content

Commit 4f43312

Browse files
authored
Merge pull request #62195 from nextcloud/chore/un-deprecate-redis
chore: undeprecate the redis cache backend
2 parents 48f579b + 3a76c57 commit 4f43312

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
@@ -111,7 +111,6 @@
111111
'OCA\\Settings\\SetupChecks\\LoggingLevel' => $baseDir . '/../lib/SetupChecks/LoggingLevel.php',
112112
'OCA\\Settings\\SetupChecks\\MaintenanceWindowStart' => $baseDir . '/../lib/SetupChecks/MaintenanceWindowStart.php',
113113
'OCA\\Settings\\SetupChecks\\MemcacheConfigured' => $baseDir . '/../lib/SetupChecks/MemcacheConfigured.php',
114-
'OCA\\Settings\\SetupChecks\\MemcacheLegacy' => $baseDir . '/../lib/SetupChecks/MemcacheLegacy.php',
115114
'OCA\\Settings\\SetupChecks\\MimeTypeMigrationAvailable' => $baseDir . '/../lib/SetupChecks/MimeTypeMigrationAvailable.php',
116115
'OCA\\Settings\\SetupChecks\\MysqlRowFormat' => $baseDir . '/../lib/SetupChecks/MysqlRowFormat.php',
117116
'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
@@ -126,7 +126,6 @@ class ComposerStaticInitSettings
126126
'OCA\\Settings\\SetupChecks\\LoggingLevel' => __DIR__ . '/..' . '/../lib/SetupChecks/LoggingLevel.php',
127127
'OCA\\Settings\\SetupChecks\\MaintenanceWindowStart' => __DIR__ . '/..' . '/../lib/SetupChecks/MaintenanceWindowStart.php',
128128
'OCA\\Settings\\SetupChecks\\MemcacheConfigured' => __DIR__ . '/..' . '/../lib/SetupChecks/MemcacheConfigured.php',
129-
'OCA\\Settings\\SetupChecks\\MemcacheLegacy' => __DIR__ . '/..' . '/../lib/SetupChecks/MemcacheLegacy.php',
130129
'OCA\\Settings\\SetupChecks\\MimeTypeMigrationAvailable' => __DIR__ . '/..' . '/../lib/SetupChecks/MimeTypeMigrationAvailable.php',
131130
'OCA\\Settings\\SetupChecks\\MysqlRowFormat' => __DIR__ . '/..' . '/../lib/SetupChecks/MysqlRowFormat.php',
132131
'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
@@ -49,7 +49,6 @@
4949
use OCA\Settings\SetupChecks\LegacySSEKeyFormat;
5050
use OCA\Settings\SetupChecks\MaintenanceWindowStart;
5151
use OCA\Settings\SetupChecks\MemcacheConfigured;
52-
use OCA\Settings\SetupChecks\MemcacheLegacy;
5352
use OCA\Settings\SetupChecks\MimeTypeMigrationAvailable;
5453
use OCA\Settings\SetupChecks\MysqlRowFormat;
5554
use OCA\Settings\SetupChecks\MysqlUnicodeSupport;
@@ -195,7 +194,6 @@ public function register(IRegistrationContext $context): void {
195194
$context->registerSetupCheck(LegacySSEKeyFormat::class);
196195
$context->registerSetupCheck(MaintenanceWindowStart::class);
197196
$context->registerSetupCheck(MemcacheConfigured::class);
198-
$context->registerSetupCheck(MemcacheLegacy::class);
199197
$context->registerSetupCheck(MimeTypeMigrationAvailable::class);
200198
$context->registerSetupCheck(MysqlRowFormat::class);
201199
$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
@@ -3002,11 +3002,6 @@
30023002
<code><![CDATA[$this->timeFactory->getTime()]]></code>
30033003
</InvalidScalarArgument>
30043004
</file>
3005-
<file src="core/Command/Memcache/RedisCommand.php">
3006-
<DeprecatedClass>
3007-
<code><![CDATA[protected]]></code>
3008-
</DeprecatedClass>
3009-
</file>
30103005
<file src="core/Command/Security/BruteforceAttempts.php">
30113006
<DeprecatedMethod>
30123007
<code><![CDATA[getAttempts]]></code>

config/config.sample.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,9 +1795,16 @@
17951795
* Connection details for the Key-Value store used for in-memory caching,
17961796
* for example when using Valkey or Redis.
17971797
*
1798-
* This is the brand-independent successor of the ``redis`` and
1799-
* ``redis.cluster`` options below and supports the latest Valkey and Redis
1800-
* releases. Three topologies are supported:
1798+
* This is the brand-independent version of the ``redis`` and
1799+
* ``redis.cluster`` options below without depending on ``php-redis``
1800+
* meaning no additional PHP extension needs to be installed.
1801+
* Redis and Valkey 4.0 up to 8.0 are supported, for SSL support Redis v6 or higher is required,
1802+
* Valkey 9 is supported but without support for numbered databased when using cluster mode.
1803+
*
1804+
* Warning: If the cache server is not hosted on the same machine as Nextcloud,
1805+
* this can have a network overhead compared to the ``php-redis`` based backend below.
1806+
*
1807+
* Three topologies are supported:
18011808
* a single server, a Sentinel managed replication set, and a
18021809
* server cluster. Configure exactly one of ``server``, ``sentinel`` or
18031810
* ``seeds``.
@@ -1881,8 +1888,6 @@
18811888
*
18821889
* We also support Redis SSL/TLS encryption as of version 6.
18831890
* See https://redis.io/topics/encryption for more information.
1884-
*
1885-
* @deprecated 34.0.0 use `memcache.kvstore` instead which supports also Valkey.
18861891
*/
18871892
'redis' => [
18881893
'host' => 'localhost', // can also be a Unix domain socket: '/tmp/redis.sock'
@@ -1922,8 +1927,6 @@
19221927
*
19231928
* Authentication works with phpredis version 4.2.1+. See
19241929
* https://github.com/phpredis/phpredis/commit/c5994f2a42b8a348af92d3acb4edff1328ad8ce1
1925-
*
1926-
* @deprecated 34.0.0 use `memcache.kvstore` instead which supports also Valkey.
19271930
*/
19281931
'redis.cluster' => [
19291932
'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
@@ -12,12 +12,6 @@
1212
use OCP\IMemcacheTTL;
1313
use OCP\Server;
1414

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

lib/private/RedisFactory.php

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

1111
use OCP\Diagnostics\IEventLogger;
1212

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

0 commit comments

Comments
 (0)