summaryrefslogtreecommitdiff
path: root/framework/Caching/TDbCache.php
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2011-07-16 22:37:30 +0000
committerctrlaltca@gmail.com <>2011-07-16 22:37:30 +0000
commit920f78939adcdb62f5e6ac9368928bd3a0fa41fc (patch)
tree041a05cfb0efc62a19ff3d867546c13edc730bae /framework/Caching/TDbCache.php
parent086387ec68df8c39ed2580a55b32f909fd092f18 (diff)
test patch for #179
Diffstat (limited to 'framework/Caching/TDbCache.php')
-rw-r--r--framework/Caching/TDbCache.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/framework/Caching/TDbCache.php b/framework/Caching/TDbCache.php
index 9d1793e1..90aa88c6 100644
--- a/framework/Caching/TDbCache.php
+++ b/framework/Caching/TDbCache.php
@@ -466,12 +466,12 @@ class TDbCache extends TCache
try {
$sql='SELECT value FROM '.$this->_cacheTable.' WHERE itemkey=\''.$key.'\' AND (expire=0 OR expire>'.time().') ORDER BY expire DESC';
$command=$this->getDbConnection()->createCommand($sql);
- return $command->queryScalar();
+ return Prado::unserialize($command->queryScalar());
}
catch(Exception $e)
{
$this->initializeCache(true);
- return $command->queryScalar();
+ return Prado::unserialize($command->queryScalar());
}
}
@@ -508,7 +508,7 @@ class TDbCache extends TCache
{
$command=$this->getDbConnection()->createCommand($sql);
$command->bindValue(':key',$key,PDO::PARAM_STR);
- $command->bindValue(':value',$value,PDO::PARAM_LOB);
+ $command->bindValue(':value',Prado::serialize($value),PDO::PARAM_LOB);
$command->execute();
return true;
}