From 70f738a14b0f6f70d9292c0f488ea423a76f438e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 7 May 2015 12:16:33 +0300 Subject: Revert "Issue/PR #3836" This reverts commit 170ae282338584ebe257d2fb21101ccf84a3f800. --- system/libraries/Cache/drivers/Cache_redis.php | 8 ++------ user_guide_src/source/changelog.rst | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 773d20c43..b940b76cb 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -165,9 +165,7 @@ class CI_Cache_redis extends CI_Driver */ public function increment($id, $offset = 1) { - return ($offset == 1) - ? $this->_redis->incr($id) - : $this->_redis->incrBy($id, $offset); + return $this->_redis->incr($id, $offset); } // ------------------------------------------------------------------------ @@ -181,9 +179,7 @@ class CI_Cache_redis extends CI_Driver */ public function decrement($id, $offset = 1) { - return ($offset == 1) - ? $this->_redis->decr($id) - : $this->_redis->decrBy($id, $offset); + return $this->_redis->decr($id, $offset); } // ------------------------------------------------------------------------ diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index c5010b61a..2d10f8f96 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -27,7 +27,6 @@ Bug fixes for 3.0.1 - Fixed a bug (#3801) - :doc:`Output Library ` method ``_display_cache()`` incorrectly looked for the last modified time of a directory instead of the cache file. - Fixed a bug (#3816) - :doc:`Form Validation Library ` treated empty string values as non-existing ones. - Fixed a bug (#3823) - :doc:`Session Library ` drivers Redis and Memcached didn't properly handle locks that are blocking the request for more than 30 seconds. -- Fixed a bug (#3836) - :doc:`Cache Library ` methods ``increment()``, ``decrement()`` didn't work with an offset other than 1 for the Redis driver. Version 3.0.0 ============= -- cgit v1.2.3-24-g4f1b