Skip to content

Commit

Permalink
ENGCOM-4183: [Backport] Fixed - Lifetime update syntax error #13309 #…
Browse files Browse the repository at this point in the history
  • Loading branch information
sivaschenko authored Feb 11, 2019
2 parents 0add114 + a3fe7c1 commit f06aa9b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/internal/Magento/Framework/Cache/Backend/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
* ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
*/

/**
* Database cache backend
*/
namespace Magento\Framework\Cache\Backend;

/**
* Database cache backend.
*/
class Database extends \Zend_Cache_Backend implements \Zend_Cache_Backend_ExtendedInterface
{
/**
Expand Down Expand Up @@ -139,7 +139,7 @@ protected function _getTagsTable()
*
* Note : return value is always "string" (unserialization is done by the core not by the backend)
*
* @param string $id Cache id
* @param string $id Cache id
* @param boolean $doNotTestCacheValidity If set to true, the cache validity won't be tested
* @return string|false cached datas
*/
Expand Down Expand Up @@ -432,7 +432,7 @@ public function touch($id, $extraLifetime)
return $this->_getConnection()->update(
$this->_getDataTable(),
['expire_time' => new \Zend_Db_Expr('expire_time+' . $extraLifetime)],
['id=?' => $id, 'expire_time = 0 OR expire_time>' => time()]
['id=?' => $id, 'expire_time = 0 OR expire_time>?' => time()]
);
} else {
return true;
Expand Down

0 comments on commit f06aa9b

Please sign in to comment.