Ejemplo n.º 1
0
 /**
  * Create new cache instance.
  *
  * @param array $options
  */
 public function __construct(array $options)
 {
     parent::__construct($options);
     if (!($dir = realpath($this->options['cache_dir']))) {
         throw new Exception(sprintf('Cache directory "%s" is not exists.', $this->options['cache_dir']));
     }
     $this->options['cache_dir'] = $dir . DIRECTORY_SEPARATOR;
 }
Ejemplo n.º 2
0
 /**
  * Create new memcache instance
  */
 public function __construct(array $options = array())
 {
     parent::__construct($options);
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 protected function sanitize($id)
 {
     return parent::sanitize(md5($id)) . self::FILE_EXTENSION;
 }