Conditions | 1 |
Paths | 1 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
20 | 20 | public function set($key, $value) |
|
21 | { |
||
22 | 20 | $cache_key = static::cacheKey($key); |
|
23 | 20 | $duration = config('settings.cache_duration'); |
|
24 | |||
25 | 20 | Setting::updateOrCreate(['key' => $key, 'owner_id' => null], ['value' => $value]); |
|
26 | 20 | Cache::put($cache_key, $value, $duration); |
|
27 | 20 | } |
|
28 | |||
54 |