Skip to content
Snippets Groups Projects
Commit 44ed3254 authored by Sascha Grossenbacher's avatar Sascha Grossenbacher Committed by Sascha Grossenbacher
Browse files

Issue #3364432 by Berdir: Make the Relay backend more resistent to errors and...

Issue #3364432 by Berdir: Make the Relay backend more resistent to errors and improve error handling
parent a5214f81
No related branches found
No related merge requests found
......@@ -108,10 +108,14 @@ class Relay extends CacheBase {
// Build the cache item and save it as a hash array.
$entry = $this->createEntryHash($cid, $data, $expire, $tags);
$pipe = $this->client->multi();
$pipe->hMset($key, $entry);
$pipe->expire($key, $ttl);
$pipe->exec();
if ($pipe = $this->client->multi()) {
$pipe->hMset($key, $entry);
$pipe->expire($key, $ttl);
$pipe->exec();
}
else {
trigger_error('Unable to start pipeline to write cache', E_USER_WARNING);
}
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment