for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the Happyr Doctrine Specification package.
*
* (c) Tobias Nyholm <[email protected]>
* Kacper Gunia <[email protected]>
* Peter Gribanov <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Happyr\DoctrineSpecification\Result;
use Doctrine\ORM\AbstractQuery;
class Cache implements ResultModifier
{
* @var int How may seconds the cache entry is valid
private $cacheLifetime;
* @param int $cacheLifetime How many seconds the cached entry is valid
public function __construct($cacheLifetime)
$this->cacheLifetime = $cacheLifetime;
}
* @param AbstractQuery $query
public function modify(AbstractQuery $query)
$query->setResultCacheLifetime($this->cacheLifetime);