Skip to content

Commit 7d34f9d

Browse files
add cache_driver configurability
1 parent 9cdf84b commit 7d34f9d

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

config/currency.php

+14
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,20 @@
4141

4242
'driver' => 'database',
4343

44+
/*
45+
|--------------------------------------------------------------------------
46+
| Default Storage Driver
47+
|--------------------------------------------------------------------------
48+
|
49+
| Here you may specify the default cache driver that should be used
50+
| by the framework.
51+
|
52+
| Supported: all cache drivers supported by Laravel
53+
|
54+
*/
55+
56+
'cache_driver' => null,
57+
4458
/*
4559
|--------------------------------------------------------------------------
4660
| Storage Specific Configuration

src/Currency.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class Currency
5858
public function __construct(array $config, FactoryContract $cache)
5959
{
6060
$this->config = $config;
61-
$this->cache = $cache;
61+
$this->cache = $cache->store($this->config('cache_driver'));
6262
}
6363

6464
/**

0 commit comments

Comments
 (0)