Skip to content

[12.x] Refactor RedisTaggedCache@flush() to allow for custom connections#57122

Merged
taylorotwell merged 2 commits into
laravel:12.xfrom
cosmastech:patch-19
Sep 20, 2025
Merged

[12.x] Refactor RedisTaggedCache@flush() to allow for custom connections#57122
taylorotwell merged 2 commits into
laravel:12.xfrom
cosmastech:patch-19

Conversation

@cosmastech

@cosmastech cosmastech commented Sep 19, 2025

Copy link
Copy Markdown
Contributor

To resolve: #57120

@miskith reports that using a the Redis Sentinel Connection package no longer allows for cache flushing. In that particular library, their Redis Connection class (PhpRedisSentinelConnection) extends Illuminate\Redis\Connections\PhpRedisConnection.

Rather than checking the class of the connection, we can just check if it is an instanceof one of the Laravel-provided connections.

Refactor redisPrefix assignment to use instance checks.
@taylorotwell taylorotwell merged commit 2c74a85 into laravel:12.x Sep 20, 2025
62 of 63 checks passed
tegos pushed a commit to tegos/laravel-framework that referenced this pull request Sep 28, 2025
…tions (laravel#57122)

* Refactor flush method to improve redisPrefix retrieval

Refactor redisPrefix assignment to use instance checks.

* clean up
@cosmastech cosmastech deleted the patch-19 branch January 24, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue with flushing redis tagged cache with custom connection

2 participants