summaryrefslogtreecommitdiffstats
path: root/system/libraries/Cache/Cache.php
diff options
context:
space:
mode:
authorAhmad Anbar <aanbar@gmail.com>2015-05-17 12:20:34 +0200
committerAhmad Anbar <aanbar@gmail.com>2015-05-17 12:20:34 +0200
commit57940dedcaab05f2dc392b2757cb3d58c59274c9 (patch)
tree1783dc5a17cc20ddede409e13984576bff274302 /system/libraries/Cache/Cache.php
parent5e50c42ef27261bc7fcb279499ce76cfc2519aa6 (diff)
parent3a9eb39f61b10b3f86e50f4cd39ca0d9f010bac2 (diff)
Merge remote-tracking branch 'upstream/develop' into develop
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))
{