Skip to content

Commit

Permalink
Add underscore to prefix in database cache key (laravel#5817)
Browse files Browse the repository at this point in the history
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"
  • Loading branch information
m4tlch authored Feb 15, 2022
1 parent 376ed67 commit 19f4e34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -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_'),

];

0 comments on commit 19f4e34

Please sign in to comment.