diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2014-01-06 22:41:46 +0100 |
---|---|---|
committer | Fabio Bas <ctrlaltca@gmail.com> | 2014-01-06 22:41:46 +0100 |
commit | 7915cde127eba2a5143fd45c6b32e81ad91bdfae (patch) | |
tree | 3f947549b691e6346cbe553e49c55d988bce7855 /framework/Caching/TMemCache.php | |
parent | 5d9f6fc77131d75e6c73a7e57df8d967b6b09215 (diff) |
Happy 2014!
Diffstat (limited to 'framework/Caching/TMemCache.php')
-rw-r--r-- | framework/Caching/TMemCache.php | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/framework/Caching/TMemCache.php b/framework/Caching/TMemCache.php index 8d2e6a4b..173d0f7c 100644 --- a/framework/Caching/TMemCache.php +++ b/framework/Caching/TMemCache.php @@ -5,7 +5,7 @@ * @author Qiang Xue <qiang.xue@gmail.com> * @author Carl G. Mathisen <carlgmathisen@gmail.com> * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2013 PradoSoft + * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id: TMemCache.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Caching @@ -109,11 +109,11 @@ class TMemCache extends TCache private $_persistence = true; /** * @var integer number of buckets to create for this server which in turn control its - * probability of it being selected. The probability is relative to the total weight + * probability of it being selected. The probability is relative to the total weight * of all servers. */ private $_weight = 1; - + private $_timeout = 360; private $_retryInterval = 15; @@ -126,9 +126,9 @@ class TMemCache extends TCache * @var float Specifies the minimum amount of savings to actually store the value compressed. The supplied value must be between 0 and 1. Default value is 0.2 giving a minimum 20% compression savings. */ private $_minSavings=0.0; - + private $_status = true; - + private $_failureCallback = null; /** @@ -176,13 +176,13 @@ class TMemCache extends TCache Prado::trace('Adding server '.$this->_host, 'System.Caching.TMemCache'); if($this->_cache->addServer($this->_host,$this->_port)===false) throw new TConfigurationException('memcache_connection_failed',$this->_host,$this->_port); - } + } if($this->_threshold!==0) - $this->_cache->setCompressThreshold($this->_threshold,$this->_minSavings); + $this->_cache->setCompressThreshold($this->_threshold,$this->_minSavings); $this->_initialized=true; parent::init($config); } - + /** * Loads configuration from an XML element * @param TXmlElement configuration node @@ -209,7 +209,7 @@ class TMemCache extends TCache ); foreach($checks as $property=>$exception) { - $value=$properties->remove($property); + $value=$properties->remove($property); if($value!==null && is_numeric($value)) $server[$property]=$value; else if($value!==null) @@ -268,7 +268,7 @@ class TMemCache extends TCache { return $this->_threshold; } - + /** * @param integer minimum value length before attempting to compress * @throws TInvalidOperationException if the module is already initialized @@ -280,7 +280,7 @@ class TMemCache extends TCache else $this->_threshold=TPropertyValue::ensureInteger($value); } - + /** * @return float minimum amount of savings to actually store the value compressed */ @@ -288,7 +288,7 @@ class TMemCache extends TCache { return $this->_minSavings; } - + /** * @param float minimum amount of savings to actually store the value compressed * @throws TInvalidOperationException if the module is already initialized @@ -300,7 +300,7 @@ class TMemCache extends TCache else $this->_minSavings=TPropertyValue::ensureFloat($value); } - + /** * Retrieves a value from cache with a specified key. * This is the implementation of the method declared in the parent class. |