Constructor.
List of available options:
\Memcache $memcache A \Memcache instance:
array $options An associative array of Memcache options:
\InvalidArgumentException When unsupported options are passed
public function __construct(\Memcache $memcache, array $options = array()) {
if ($diff = array_diff(array_keys($options), array(
'prefix',
'expiretime',
))) {
throw new \InvalidArgumentException(sprintf('The following options are not supported "%s"', implode(', ', $diff)));
}
$this->memcache = $memcache;
$this->ttl = isset($options['expiretime']) ? (int) $options['expiretime'] : 86400;
$this->prefix = isset($options['prefix']) ? $options['prefix'] : 'sf2s';
}