The values of the following 15 IDs are obtained in bulk by Memcached's Getmulti function.
31639,33878,177410,9735,589,12076,25953,22447,15368,15358,33853,26658,26659,12477,15366
$MD->getmulti ($arr _id);
Order of Return:
line_31639,line_33878,line_177410,line_9735,line_589,line_12076,line_25953,line_22447,line_15368,line_15358, line_33853,line_26658,line_26659,line_12477,line_15366,
A memcache is returned correctly when there are multiple memcache that cannot be returned sequentially.
You need to use Memcached::get_preserve_order to return data sequentially:
$arrs = $mem->getmulti ($arr _id, $cas, Memcached::get_preserve_order);
Order of Return:
line_31639,line_33878,line_9735,line_589,line_22447,line_15358,line_33853,line_26658,line_177410,line_12076, line_25953,line_15368,line_26659,line_12477,line_15366,
In this case, if there are no hit variables, then $cas will play a role. $cas return a hit variable, traverse $cas to take out the hit variable to make up the data, then compare the Array_diff function with the $arr_id to remove the difference, then go to one by one settings.
The above describes the memcache batch to get Memcache value and the order of the key to return the implementation code, including the memcache aspect of the content, I hope the PHP tutorial interested in a friend helpful.