Exemplo n.º 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'));
 }
Exemplo n.º 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);
 }
Exemplo n.º 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'))));
 }
Exemplo n.º 4
0
 public function __construct($options = array())
 {
     parent::__construct($options);
 }
Exemplo n.º 5
0
 public function __construct(\Predis\Client $redis, $options = array())
 {
     parent::__construct($options);
     $this->redis = $redis;
 }