summaryrefslogtreecommitdiff
path: root/framework/Caching/TDbCache.php
diff options
context:
space:
mode:
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
{