diff --git a/src/CacheEnginesHelper.php b/src/CacheEnginesHelper.php index d6b9c0c..7093e6a 100644 --- a/src/CacheEnginesHelper.php +++ b/src/CacheEnginesHelper.php @@ -80,7 +80,12 @@ public static function writeWithParent( $config = 'default', $parentKey = '' ) { - $settings = Cache::settings($config); + + if (method_exists(Cache::engine($config), 'getActiveCacheSettings')) { + $settings = Cache::engine($config)->getActiveCacheSettings(); + } else { + $settings = Cache::settings($config); + } if (empty($settings)) { return false; diff --git a/src/FallbackEngine.php b/src/FallbackEngine.php index 546eff3..d3cf553 100644 --- a/src/FallbackEngine.php +++ b/src/FallbackEngine.php @@ -150,4 +150,9 @@ public function key($key) { return Cache::engine($this->activeCache)->key($key); } + + public function getActiveCacheSettings() + { + return Cache::engine($this->activeCache)->settings(); + } }