From 8fd040ef49321fce9d3d0b9c44937984a2112b52 Mon Sep 17 00:00:00 2001
From: xue <>
Date: Sat, 19 Nov 2005 04:35:07 +0000
Subject:
---
framework/Data/TMemCache.php | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
(limited to 'framework/Data/TMemCache.php')
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');
*
*
+ * 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
+ *
+ * where {@link getHost Host} and {@link getPort Port} are configurable properties
+ * of TMemCache.
+ *
* @author Qiang Xue
* @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;
--
cgit v1.2.3