summaryrefslogtreecommitdiff
path: root/framework/Caching/TDbCache.php
diff options
context:
space:
mode:
authorxue <>2007-11-26 12:40:48 +0000
committerxue <>2007-11-26 12:40:48 +0000
commitb6301aa5e266edb4daa70ec95aa3ad059ee31e6a (patch)
tree6a00b14a4af308a071f01e7481dac8d6b38003a9 /framework/Caching/TDbCache.php
parentae1914700563c6a15d48ba7495ceeaa4792abba5 (diff)
fixed #750.
Diffstat (limited to 'framework/Caching/TDbCache.php')
-rw-r--r--framework/Caching/TDbCache.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/framework/Caching/TDbCache.php b/framework/Caching/TDbCache.php
index c71d51ea..4acb2454 100644
--- a/framework/Caching/TDbCache.php
+++ b/framework/Caching/TDbCache.php
@@ -338,6 +338,7 @@ class TDbCache extends TCache
*/
protected function addValue($key,$value,$expire)
{
+ $expire=($expire<=0)?0:time()+$expire;
$sql="INSERT INTO {$this->_cacheTable} (itemkey,value,expire) VALUES(:key,:value,$expire)";
try
{