WP_Background_Process::generate_key PHP Method

generate_key() protected method

Generates a unique key based on microtime. Queue items are given a unique key so that they can be merged upon save.
protected generate_key ( integer $length = 64 ) : string
$length integer Length.
return string
        protected function generate_key($length = 64)
        {
            $unique = md5(microtime() . rand());
            $prepend = $this->identifier . '_batch_';
            return substr($prepend . $unique, 0, $length);
        }