Commit 4286a218 authored by Erick Hitter's avatar Erick Hitter
Browse files

Support delay before flushing Redis

parent 01b7283c
......@@ -908,6 +908,11 @@ class WP_Object_Cache {
* @return bool Returns TRUE on success or FALSE on failure.
*/
public function flush( $delay = 0 ) {
$delay = absint( $delay );
if ( $delay ) {
sleep( $delay );
}
$result = $this->redis->flushall();
return $result;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment