summaryrefslogtreecommitdiff
path: root/framework/Caching/TMemCache.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2014-01-06 22:41:46 +0100
committerDavid <ottodavid@gmx.net>2014-08-21 17:20:54 +0200
commitfc0db15ebce101602fb1cbfa8f6a5cc0f8b58be4 (patch)
tree80fff53aa0d9c60612bc2ca690a46194e9c160cf /framework/Caching/TMemCache.php
parent48577f63f414dc3078abc4bdc93bde932fe666a6 (diff)
Happy 2014!
(cherry picked from commit 7915cde127eba2a5143fd45c6b32e81ad91bdfae) Conflicts: framework/Data/Common/Mssql/TMssqlMetaData.php framework/Data/Common/Mysql/TMysqlMetaData.php framework/Data/Common/Oracle/TOracleMetaData.php framework/Data/Common/Pgsql/TPgsqlMetaData.php framework/Data/Common/Sqlite/TSqliteMetaData.php framework/Data/Common/TDbMetaData.php framework/Web/UI/ActiveControls/TCallbackClientScript.php framework/Web/UI/JuiControls/TJuiAutoComplete.php framework/Web/UI/JuiControls/TJuiControlAdapter.php framework/Web/UI/JuiControls/TJuiDraggable.php framework/Web/UI/JuiControls/TJuiDroppable.php framework/Web/UI/JuiControls/TJuiResizable.php framework/Web/UI/JuiControls/TJuiSelectable.php framework/Web/UI/JuiControls/TJuiSortable.php framework/Wsat/TWsatARGenerator.php framework/Wsat/TWsatService.php framework/Wsat/pages/TWsatGenerateAR.php framework/Wsat/pages/TWsatHome.php framework/Wsat/pages/TWsatLogin.php framework/Wsat/pages/TWsatScaffolding.php
Diffstat (limited to 'framework/Caching/TMemCache.php')
-rw-r--r--framework/Caching/TMemCache.php26
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 &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 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.