Inconsistent expiration behaviour for memory storage when replacing #23

instanceofme opened this Issue Sep 16, 2011 · 2 comments


None yet

2 participants


With*Storage and userData, if I replace a previously-expirable value and don't set an expiration, there is no expiration (which is the behavior I expect). With memory storage however, the first expiration will delete the replaced value (the setTimeout is not cleared).[type]( 'key', 'value1', {expires: 500} );[type]( 'key', 'value2' );
window.setTimeout( function(){ alert([type]( 'key' ) ) }, 1000 );

This JsFiddle tests all storage types available to the current browser.


Fix proposal in pull request #24, I don't know if you can merge those discussions…

@scottgonzalez scottgonzalez reopened this Sep 16, 2011

I didn't want that commit to close this ticket. I just wanted to post my suggested fix to start a discussion with @streetpc. I guess next time I'll have to do it from my own account...

@scottgonzalez scottgonzalez added a commit that closed this issue Sep 16, 2011
@instanceofme @scottgonzalez instanceofme + scottgonzalez Store: When setting a value in memory, clear any previous timeout. Fi…
…xes #23 - Inconsistent expiration behaviour for memory storage when replacing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment