From 19f4e346d4e50eeab3a8840b93f89c9f1ffe2a42 Mon Sep 17 00:00:00 2001 From: m4tlch Date: Tue, 15 Feb 2022 17:09:29 +0200 Subject: [PATCH] Add underscore to prefix in database cache key (#5817) For Redis caching prefix with underscore : 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'), but when cache stored in database, then the key is created "merged" with prefix, by this line: 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), for example, if "key" is a key for cache, then the result is: "laravel_cachekey", not a preferable "laravel_cache_key" --- config/cache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/cache.php b/config/cache.php index 8736c7a7..0ad5c740 100644 --- a/config/cache.php +++ b/config/cache.php @@ -105,6 +105,6 @@ | */ - 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), + 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), ];