. */ namespace Doctrine\ORM\Cache; use Doctrine\ORM\Cache; /** * A cache key that identifies a particular query. * * @since 2.5 * @author Fabio B. Silva */ class QueryCacheKey extends CacheKey { /** * READ-ONLY: Public only for performance reasons, it should be considered immutable. * * @var integer Cache key lifetime */ public $lifetime; /** * READ-ONLY: Public only for performance reasons, it should be considered immutable. * * @var integer Cache mode (Doctrine\ORM\Cache::MODE_*) */ public $cacheMode; /** * @param string $hash Result cache id * @param integer $lifetime Query lifetime * @param integer $cacheMode Query cache mode */ public function __construct($hash, $lifetime = 0, $cacheMode = Cache::MODE_NORMAL) { $this->hash = $hash; $this->lifetime = $lifetime; $this->cacheMode = $cacheMode; } }