Nette\Caching\Storages\NewMemcachedStorage::__construct PHP Method

__construct() public method

public __construct ( $host = 'localhost', $port = 11211, $prefix = '', Nette\Caching\Storages\IJournal $journal = NULL )
$journal Nette\Caching\Storages\IJournal
    public function __construct($host = 'localhost', $port = 11211, $prefix = '', IJournal $journal = NULL)
    {
        if (!static::isAvailable()) {
            throw new Nette\NotSupportedException("PHP extension 'memcached' is not loaded.");
        }
        $this->prefix = $prefix;
        $this->journal = $journal;
        $this->memcached = new \Memcached();
        if ($host) {
            $this->addServer($host, $port);
        }
    }