summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cache/Cache.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-04-29 10:21:31 +0200
committerAndrey Andreev <narf@devilix.net>2015-04-29 10:21:31 +0200
commitb938f94d96a1a3cce225e63c9aafc639523dd29f (patch)
tree8578786dbb6c26329b732a3619b1988eac233ffc /system/libraries/Cache/Cache.php
parent8e08af12f60f1b00880ba2dbe8306fa669c8abed (diff)
parentef0173db881f326db14e00cb333b9059349fc9a3 (diff)
Merge pull request #3804 from refringe/feature/cache-defaults
Cache Library Clean-up
Diffstat (limited to 'system/libraries/Cache/Cache.php')
-rw-r--r--system/libraries/Cache/Cache.php22
1 files changed, 2 insertions, 20 deletions
diff --git a/system/libraries/Cache/Cache.php b/system/libraries/Cache/Cache.php
index 40ac70103..215a7c528 100644
--- a/system/libraries/Cache/Cache.php
+++ b/system/libraries/Cache/Cache.php
@@ -100,28 +100,10 @@ class CI_Cache extends CI_Driver_Library {
*/
public function __construct($config = array())
{
- $default_config = array(
- 'adapter',
- 'memcached'
- );
-
- foreach ($default_config as $key)
- {
- if (isset($config[$key]))
- {
- $param = '_'.$key;
-
- $this->{$param} = $config[$key];
- }
- }
-
+ isset($config['adapter']) && $this->_adapter = $config['adapter'];
+ isset($config['backup']) && $this->_backup_driver = $config['backup'];
isset($config['key_prefix']) && $this->key_prefix = $config['key_prefix'];
- if (isset($config['backup']) && in_array($config['backup'], $this->valid_drivers))
- {
- $this->_backup_driver = $config['backup'];
- }
-
// If the specified adapter isn't available, check the backup.
if ( ! $this->is_supported($this->_adapter))
{