public function delete($key, $onResponse = null, $time = 0)
{
$this->getConnectionByKey($key, function ($conn) use($key, $time, $onResponse) {
if (!$conn->connected) {
return;
}
if ($onResponse !== null) {
$conn->onResponse->push($onResponse);
$conn->checkFree();
}
$conn->writeln('delete ' . $this->config->prefix->value . $key . ' ' . $time);
});
}