Skip to content

Commit 19f4e34

Browse files
authored
Add underscore to prefix in database cache key (laravel#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"
1 parent 376ed67 commit 19f4e34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,6 @@
105105
|
106106
*/
107107

108-
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
108+
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'),
109109

110110
];

0 commit comments

Comments
 (0)