As I know, the first event we must check the exist of an item.
And then Get the item, and set it to the global variable, also if missing, create the item.
So, the totals events used are 3 events for each item.
Are there any more simple way to do this?