protected function generate_key($length = 64) { $unique = md5(microtime() . rand()); $prepend = $this->identifier . '_batch_'; return substr($prepend . $unique, 0, $length); }