From 87c3478c7457a2e33f16950463fc80927d4a5607 Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Tue, 26 Sep 2017 11:58:33 -0400 Subject: [PATCH] Use the APP_NAME to set the cache prefix --- .env.example | 1 - config/cache.php | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index a6002d0..4bb3604 100644 --- a/.env.example +++ b/.env.example @@ -19,7 +19,6 @@ DB_DATABASE=hypothetical DB_USERNAME=homestead DB_PASSWORD=secret -CACHE_NAME=hypothetical CACHE_DRIVER=file BROADCAST_DRIVER=log SESSION_DRIVER=file diff --git a/config/cache.php b/config/cache.php index c6a0c6b..0aa4caa 100644 --- a/config/cache.php +++ b/config/cache.php @@ -86,6 +86,9 @@ return [ | */ - 'prefix' => env('CACHE_NAME', 'hypothetical'), + 'prefix' => env( + 'CACHE_PREFIX', + str_slug(env('APP_NAME', 'hypothetical'), '_').'_cache' + ), ];