diff --git a/.env.ci b/.env.ci index 0f42aca9..9f09acca 100644 --- a/.env.ci +++ b/.env.ci @@ -16,7 +16,9 @@ DB_USERNAME=hackgreenville DB_PASSWORD=test BROADCAST_DRIVER=log -CACHE_DRIVER=file +# Tests must use an isolated in-memory cache. A persistent driver leaks +# Cache::remember() values (e.g. the homepage stats) across test methods. +CACHE_STORE=array SESSION_DRIVER=file SESSION_LIFETIME=120 QUEUE_DRIVER=sync diff --git a/.env.docker b/.env.docker index eb319be6..a6186d17 100644 --- a/.env.docker +++ b/.env.docker @@ -26,7 +26,7 @@ MYSQL_PASSWORD="${DB_PASSWORD}" MYSQL_ALLOW_EMPTY_PASSWORD="yes" BROADCAST_DRIVER=log -CACHE_DRIVER=file +CACHE_STORE=file SESSION_DRIVER=file SESSION_LIFETIME=120 QUEUE_DRIVER=sync diff --git a/.env.example b/.env.example index 933cab4b..ad26b5c0 100644 --- a/.env.example +++ b/.env.example @@ -32,8 +32,8 @@ DB_USERNAME=homestead DB_PASSWORD=secret BROADCAST_DRIVER=log -# Setting the cache driver to "array" will disable the cache -CACHE_DRIVER=file +# Setting the cache store to "array" will disable the cache +CACHE_STORE=file SESSION_DRIVER=file SESSION_LIFETIME=120 QUEUE_DRIVER=sync diff --git a/.env.testing b/.env.testing index 5ab21a64..22d158c6 100644 --- a/.env.testing +++ b/.env.testing @@ -12,7 +12,9 @@ DB_CONNECTION=sqlite DB_HOST=:memory: BROADCAST_DRIVER=log -CACHE_DRIVER=file +# Tests must use an isolated in-memory cache. A persistent driver leaks +# Cache::remember() values (e.g. the homepage stats) across test methods. +CACHE_STORE=array SESSION_DRIVER=file SESSION_LIFETIME=120 QUEUE_DRIVER=sync diff --git a/config/cache.php b/config/cache.php index 6d571961..a0f38dfa 100644 --- a/config/cache.php +++ b/config/cache.php @@ -7,15 +7,13 @@ | Default Cache Store |-------------------------------------------------------------------------- | - | This option controls the default cache connection that gets used while - | using this caching library. This connection is used when another is - | not explicitly specified when executing a given caching function. - | - | Supported: "apc", "array", "database", "file", "memcached", "redis" + | This option controls the default cache store that will be used by the + | framework. This connection is utilized if another isn't explicitly + | specified when running a cache operation inside the application. | */ - 'default' => env('CACHE_DRIVER', 'file'), + 'default' => env('CACHE_STORE', 'file'), /* |-------------------------------------------------------------------------- @@ -39,37 +37,37 @@ ], 'database' => [ - 'driver' => 'database', - 'table' => 'cache', + 'driver' => 'database', + 'table' => 'cache', 'connection' => null, ], 'file' => [ 'driver' => 'file', - 'path' => storage_path('framework/cache/data'), + 'path' => storage_path('framework/cache/data'), ], 'memcached' => [ - 'driver' => 'memcached', + 'driver' => 'memcached', 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), - 'sasl' => [ + 'sasl' => [ env('MEMCACHED_USERNAME'), env('MEMCACHED_PASSWORD'), ], - 'options' => [ + 'options' => [ // Memcached::OPT_CONNECT_TIMEOUT => 2000, ], - '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', ], diff --git a/phpunit.xml b/phpunit.xml index 0f8463bb..436a820f 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -23,7 +23,7 @@ - +