public function replace($key, $value, $exp = 0, $onResponse = null)
{
$this->getConnectionByKey($key, function ($conn) use($key, $value, $exp, $onResponse) {
if (!$conn->connected) {
return;
}
if ($onResponse !== null) {
$conn->onResponse->push($onResponse);
$conn->checkFree();
}
$conn->writeln('replace ' . $this->config->prefix->value . $key . ' 0 ' . $exp . ' ' . mb_orig_strlen($value) . ($onResponse === null ? ' noreply' : '') . "\r\n" . $value);
});
}