From 8f6a271cc0d443d51ed6a15a435ebdd1cffa9c82 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 25 Dec 2016 13:38:30 +0100 Subject: [PATCH] Add the ability to prefix cache differently. --- .env.example | 1 + config/cache.php | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.env.example b/.env.example index 1333892862..706f519c62 100755 --- a/.env.example +++ b/.env.example @@ -37,6 +37,7 @@ MAIL_ENCRYPTION=null SEND_REGISTRATION_MAIL=true SEND_ERROR_MESSAGE=true SHOW_INCOMPLETE_TRANSLATIONS=false +CACHE_PREFIX=firefly ANALYTICS_ID= SITE_OWNER=mail@example.com diff --git a/config/cache.php b/config/cache.php index 14728ed330..b8bc5dc989 100644 --- a/config/cache.php +++ b/config/cache.php @@ -48,36 +48,36 @@ return [ ], 'database' => [ - 'driver' => 'database', - 'table' => 'cache', + 'driver' => 'database', + 'table' => 'cache', 'connection' => null, ], 'file' => [ 'driver' => 'file', - 'path' => storage_path('framework/cache'), + 'path' => storage_path('framework/cache'), ], 'memcached' => [ - 'driver' => 'memcached', + 'driver' => 'memcached', 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), - 'sasl' => [ + 'sasl' => [ env('MEMCACHED_USERNAME'), env('MEMCACHED_PASSWORD'), ], - 'options' => [ + 'options' => [ ], - 'servers' => [ + 'servers' => [ [ - 'host' => env('MEMCACHED_HOST', '127.0.0.1'), - 'port' => env('MEMCACHED_PORT', 11211), + 'host' => env('MEMCACHED_HOST', '127.0.0.1'), + 'port' => env('MEMCACHED_PORT', 11211), 'weight' => 100, ], ], ], 'redis' => [ - 'driver' => 'redis', + 'driver' => 'redis', 'connection' => 'default', ], @@ -94,6 +94,6 @@ return [ | */ - 'prefix' => 'firefly', + 'prefix' => env('CACHE_PREFIX', 'firefly'), ];