title: What would cause redis to retain an old key?
body: <p>We're running an install of Magento Enterprise which has built-in support for using Redis as a session handler.</p>
  
  <p>For context: We're having with a module that implements PayPal payment method as an option for our users.</p>
  
  <p>The module generates a lightbox with the PayPal form in it so that the user doesn't have to be redirected away from the page.</p>
  
  <p>To do this, we have to generate a token, and save it to the session. The lightbox loads in the PayPal page with the token in the URL parameter. </p>
  
  <p>When the user completes the form, the user is redirected to a confirm order page with the same token in the URL.</p>
  
  <p>The URL token has to match the session token, or else the process fails.</p>
  
  <p>This works fine when we disable redis and use normal file sessions (which we cannot do in our production environment).</p>
  
  <p>Here is what we don't understand:</p>
  
  <p>When we step through the code with xdebug with breakpoints, we see the token being set in the session in redis. The payment processing works fine.</p>
  
  <p>When we don't step through the code, the process fails due to a token mismatch, and when we inspect the token key throughout the process, it originally sets it correctly, and then at the end, the token is we see is a token that was set several sessions ago.</p>
  
  <p>The TTL on the session key is 24 minutes but don't think that should be an issue because it should be overwriting the value. Not sure why it works fine when we pause through the process with breakpoints.</p>
  
  <p>Any ideas?</p>