You are here

public function SessionProxy_Storage_Cache::__construct in Session Proxy 7

Overrides SessionProxy_Storage_Base::__construct

File

lib/SessionProxy/Storage/Cache.php, line 127

Class

SessionProxy_Storage_Cache
Storage implementation based upon a specific cache backend.

Code

public function __construct(array $options = array()) {
  parent::__construct($options);
  $bin = isset($this->options['cache_bin']) ? $this->options['cache_bin'] : 'cache_sessions';
  if (!isset($this->options['cache_backend']) || !class_exists($this->options['cache_backend'])) {
    $this->cacheBackend = new DrupalDatabaseCache($bin);
  }
  else {
    $class = $this->options['cache_backend'];
    $this->cacheBackend = new $class($bin);
  }
}