public function __construct(array $options = array(), $context = null, LoggerInterface $logger = null)
 {
     parent::__construct($options, $context, $logger);
 }
Beispiel #2
0
 /**
  * Returns the expiration timestamp.
  *
  * @param int $lifetime
  *
  * @return int
  * @codeCoverageIgnore
  */
 public function getExpireTime($lifetime = null, $bypass_control = false)
 {
     $expire = parent::getExpireTime($lifetime, $bypass_control);
     return 0 === $expire ? null : date_timestamp_set(new \DateTime(), $expire);
 }
Beispiel #3
0
 /**
  * Class constructor.
  *
  * @param array                    $options Initial options for the cache adapter: none to be defined
  * @param string                   $context An optional cache context
  * @param \Psr\Log\LoggerInterface $logger  An optional logger
  *
  * @throws \BackBee\Cache\Exception\CacheException Occurs if the entity manager for this cache adaptor cannot be created
  */
 public function __construct(array $options = array(), $context = null, LoggerInterface $logger = null)
 {
     if (false === extension_loaded('apc')) {
         throw new CacheException('APC extension not loaded');
     }
     parent::__construct($options, $context, $logger);
     $this->_hashmapId = self::HASHMAP_PREFIX . '_' . md5($this->getContext());
     $this->_hashmap = $this->loadHashmap();
 }