Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

session.touch() doesn't seem to do store.touch() #442

Closed
ile opened this issue Mar 12, 2017 · 3 comments · May be fixed by #862
Closed

session.touch() doesn't seem to do store.touch() #442

ile opened this issue Mar 12, 2017 · 3 comments · May be fixed by #862

Comments

@ile
Copy link

ile commented Mar 12, 2017

Hi,

Why is it that this function: https://github.com/expressjs/session/blob/master/session/session.js#L47-L49

... doesn't look more like this:

Session.prototype.touch = function(){
  this.resetMaxAge();

  if (typeof this.req.sessionStore.touch === 'function') {
    this.req.sessionStore.touch(this.id, this);
  }

  return this;
};

i.e. touch also the session in store?

@dougwilson
Copy link
Contributor

Hi @ile good question, I'm not sure. It may have been overlooked when session touch support was added. I'm not sure if it's possible to add that in now in a backwards-compatible way, though. Thoughts?

@ile
Copy link
Author

ile commented Mar 15, 2017

Hey.

I don't know either. Maybe someone else (@tj?) has some ideas? Or maybe the change could be put in the next major version, not sure.

I guess I will have to fork this and use that fork, for now.

@dougwilson
Copy link
Contributor

Closing because no follow up and I'm not clear on what exactly is supposed to be done here. Perhaps an outline of the ask or even a PR 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants