This is more of a performance increase, since the buggy behavior just causes addItemToKey to write to APC more often than necessary. However, the write is idempotent: repeatedly setting $arr[$xxx] = 1 and saving the array to APC doesn't affect the correctness of the result, nor does fixing it change the storage format. It just prevents unnecessary writes to APC when the array already contains $arr[$xxx] for some value of $xxx.
This is more of a performance increase, since the buggy behavior just causes
addItemToKey
to write to APC more often than necessary. However, the write is idempotent: repeatedly setting$arr[$xxx] = 1
and saving the array to APC doesn't affect the correctness of the result, nor does fixing it change the storage format. It just prevents unnecessary writes to APC when the array already contains$arr[$xxx]
for some value of$xxx
.Signed-off-by: Paul Kreiner github-paul@thedeacon.org