I love this site, able to find answers to all my questions until now.
I have a two Ajax transaction process here, where in the first transaction the values entered are put into the Session, the second transaction retrieves values entered and the previous transactions values in order to know how to proceed. This statement does not appear to be reliable, but it works better than 90% of the time. Why is it not reliable? The transaction completes successfully, and the screen appears correctly formatted.
Session::put('previous', serialize($entry));
Example transaction A; User scans an item UPC, the transaction identifies the UPC 0587 as correct, creates $entry, and responds back to the user "Please put 0587 into tote 3334"
$entry = (object) ['type' => 'UPC', 'text' => '0587'];
Session::put('previous', serialize($entry));
Example transaction B; Users scans the tote, the transaction identifies tote 3334 as correct, then asks for the previous transaction entry
$previous = (object) unserialize(Session::get('previous', self::UNKNOWN_SERIAL));
Better than 90% of the time $previous equals what we want (UPC, 0587). Sometimes $previous equals the values from a prior transaction before transaction A. $previous would equal self::UNKNOWN_SERIAL on the first transaction after logon.
Why does Session::put(..) appear unreliable?
Any help would be appreciated.