Пример #1
0
 /**
  * Create new instance.
  *
  * - store = path to file store
  *
  * @param array $options ParameterBag
  */
 public function __construct($options = array())
 {
     parent::__construct($options);
     $this->cache = $this->_init();
     // Register a shutdown function to flush to file
     register_shutdown_function(array($this, 'flush'));
 }
Пример #2
0
 public function __construct($options = array())
 {
     if (!function_exists('apc_store')) {
         throw new Exception("The APC extension does not seem to be loaded.");
     }
     parent::__construct($options);
 }
Пример #3
0
 public function __construct($options = array())
 {
     parent::__construct($options);
     //Load memcache
     if (!extension_loaded('memcache')) {
         throw new Exception("The Memcache extension does not seem to be loaded.");
     }
     $this->memcache = new \Memcache();
     $this->loadServers($this->options->get('servers', array(array('host' => 'localhost'))));
 }
Пример #4
0
 public function __construct($options = array())
 {
     parent::__construct($options);
 }
Пример #5
0
 public function __construct(\Predis\Client $redis, $options = array())
 {
     parent::__construct($options);
     $this->redis = $redis;
 }