Skip to content

Conversation

shatterproof
Copy link

@shatterproof shatterproof commented Jul 11, 2022

PR #5817 accidentally adds an excessive underscore to the end of the Redis cache key prefix, causing keys to become laravel_cache_:key instead of simply laravel_cache:key.

A colon is already included at the end of the prefix for Redis, which occurs in Illuminate\Cache\RedisStore.php:

public function setPrefix($prefix)
{
    $this->prefix = ! empty($prefix) ? $prefix.':' : '';
}

This commit will simply undo the change to streamline the prefix as it was before without the underscore.

The issue mentioned in the PR linked above only affects the database cache driver, so it would be more efficient and consistent to just add a colon to the prefix in Illuminate\Cache\DatabaseStore.php instead. (laravel/framework#43123)

@taylorotwell
Copy link
Member

I don't want to make a breaking change here.

@shatterproof shatterproof deleted the patch-1 branch July 11, 2022 20:36
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.

2 participants