Renames $_adapter to $_driver. It's what we call it everywhere else.
diff --git a/system/libraries/Cache/Cache.php b/system/libraries/Cache/Cache.php
index 5d32240..39d05d9 100644
--- a/system/libraries/Cache/Cache.php
+++ b/system/libraries/Cache/Cache.php
@@ -74,7 +74,7 @@
*
* @var mixed
*/
- protected $_adapter = 'dummy';
+ protected $_driver = 'dummy';
/**
* Fallback driver
@@ -114,19 +114,19 @@
isset($config['key_prefix']) && $this->key_prefix = $config['key_prefix'];
// If the specified adapter isn't available, check the backup.
- if ( ! $this->is_supported($this->_adapter))
+ if ( ! $this->is_supported($this->_driver))
{
if ( ! $this->is_supported($this->_backup))
{
// Backup isn't supported either. Default to 'Dummy' driver.
- log_message('error', 'Cache adapter "'.$this->_adapter.'" and backup "'.$this->_backup.'" are both unavailable. Cache is now using "Dummy" adapter.');
- $this->_adapter = 'dummy';
+ log_message('error', 'Cache adapter "'.$this->_driver.'" and backup "'.$this->_backup.'" are both unavailable. Cache is now using "Dummy" adapter.');
+ $this->_driver = 'dummy';
}
else
{
// Backup is supported. Set it to primary.
- log_message('debug', 'Cache adapter "'.$this->_adapter.'" is unavailable. Falling back to "'.$this->_backup.'" backup adapter.');
- $this->_adapter = $this->_backup;
+ log_message('debug', 'Cache adapter "'.$this->_driver.'" is unavailable. Falling back to "'.$this->_backup.'" backup adapter.');
+ $this->_driver = $this->_backup;
}
}
}
@@ -144,7 +144,7 @@
*/
public function get($id)
{
- return $this->{$this->_adapter}->get($this->key_prefix.$id);
+ return $this->{$this->_driver}->get($this->key_prefix.$id);
}
// ------------------------------------------------------------------------
@@ -160,7 +160,7 @@
*/
public function save($id, $data, $ttl = 60, $raw = FALSE)
{
- return $this->{$this->_adapter}->save($this->key_prefix.$id, $data, $ttl, $raw);
+ return $this->{$this->_driver}->save($this->key_prefix.$id, $data, $ttl, $raw);
}
// ------------------------------------------------------------------------
@@ -173,7 +173,7 @@
*/
public function delete($id)
{
- return $this->{$this->_adapter}->delete($this->key_prefix.$id);
+ return $this->{$this->_driver}->delete($this->key_prefix.$id);
}
// ------------------------------------------------------------------------
@@ -187,7 +187,7 @@
*/
public function increment($id, $offset = 1)
{
- return $this->{$this->_adapter}->increment($id, $offset);
+ return $this->{$this->_driver}->increment($id, $offset);
}
// ------------------------------------------------------------------------
@@ -201,7 +201,7 @@
*/
public function decrement($id, $offset = 1)
{
- return $this->{$this->_adapter}->decrement($id, $offset);
+ return $this->{$this->_driver}->decrement($id, $offset);
}
// ------------------------------------------------------------------------
@@ -213,7 +213,7 @@
*/
public function clean()
{
- return $this->{$this->_adapter}->clean();
+ return $this->{$this->_driver}->clean();
}
// ------------------------------------------------------------------------
@@ -226,7 +226,7 @@
*/
public function cache_info($type = 'user')
{
- return $this->{$this->_adapter}->cache_info($type);
+ return $this->{$this->_driver}->cache_info($type);
}
// ------------------------------------------------------------------------
@@ -239,7 +239,7 @@
*/
public function get_metadata($id)
{
- return $this->{$this->_adapter}->get_metadata($this->key_prefix.$id);
+ return $this->{$this->_driver}->get_metadata($this->key_prefix.$id);
}
// ------------------------------------------------------------------------