summaryrefslogtreecommitdiff
path: root/framework/Data/TMemCache.php
diff options
context:
space:
mode:
authorxue <>2005-11-19 04:35:07 +0000
committerxue <>2005-11-19 04:35:07 +0000
commit8fd040ef49321fce9d3d0b9c44937984a2112b52 (patch)
tree573dcfe6a3ec6d5a3b7fde9298dcc1b4f45116b1 /framework/Data/TMemCache.php
parentbc1a7e1e3a67537189d30013ea6d5fa4bf98e8e4 (diff)
Diffstat (limited to 'framework/Data/TMemCache.php')
-rw-r--r--framework/Data/TMemCache.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/framework/Data/TMemCache.php b/framework/Data/TMemCache.php
index 9786b467..b78014fb 100644
--- a/framework/Data/TMemCache.php
+++ b/framework/Data/TMemCache.php
@@ -49,6 +49,14 @@
* $object2=$cache->get('object');
* </code>
*
+ * If loaded, TMemCache will register itself with {@link TApplication} as the
+ * cache module. It can be accessed via {@link TApplication::getCache()}.
+ *
+ * TMemCache may be configured in application configuration file as follows
+ * <module id="cache" type="System.Data.TMemCache" Host="localhost" Port=11211 />
+ * where {@link getHost Host} and {@link getPort Port} are configurable properties
+ * of TMemCache.
+ *
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Revision: $ $Date: $
* @package System.Data
@@ -107,7 +115,7 @@ class TMemCache extends TComponent implements IModule, ICache
throw new TConfigurationException('memcache_extension_required');
$this->_cache=new Memcache;
if($this->_cache->connect($this->_host,$this->_port)===false)
- throw new TInvalidConfigurationException('memcache_connection_failed');
+ throw new TInvalidConfigurationException('memcache_connection_failed',$this->_host,$this->_port);
if($application instanceof TApplication)
$this->_prefix=$application->getUniqueID();
$this->_initialized=true;