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

Invert the TTL value and extend to fixed #1480

Merged
merged 1 commit into from
Jul 2, 2018

Conversation

Martii
Copy link
Member

@Martii Martii commented Jul 2, 2018

  • Now this is giving predictable results so far (on dev which has newer MongoDB).

Refs:

NOTES:
These versions of the docs are ambiguous. The TTL is how often it reaches out to the DB... if it finds an expired session or a session cookie it will then remove it. So the inversion of the logic should fix this as it checks every 10ish minutes for expiry as well as session cookies and destroys them. Had a light bulb flip on with interval being doc'd at 10 minutes so I thought to try TTL at that... and voila. :)

This theoretically should solve #604 by sticking to this methodology (until MongoDB changes something heh)

When available will do some code condensing to reuse some more code if applicable.

Post #1471 ... related to #604

* Now this is giving predictable results so far.

Refs:
* https://github.com/jdesboeufs/connect-mongo/blob/9f86f90/README.md#session-expiration
* https://github.com/jdesboeufs/connect-mongo/blob/9f86f90/README.md#remove-expired-sessions

NOTES:
These versions of the docs are ambiguous. The TTL is how often it reaches out to the DB... if it finds an expired session **or** a session cookie it will then remove it. So the inversion of the logic should fix this as it checks every 10ish minutes for expiry as well as session cookies and destroys them. Had a light bulb flip on with `interval` being doc'd at 10 minutes so I thought to try TTL at that... and voila. :)

This theoretically should solve OpenUserJS#604 by sticking to this methodology *(until MongoDB changes something heh)*

When available will do some code condensing to reuse some more code if applicable.

Post OpenUserJS#1471 ... related to OpenUserJS#604
@Martii Martii added enhancement Something we do have implemented already but needs improvement upon to the best of knowledge. UI Pertains inclusively to the User Interface. DB Pertains inclusively to the Database operations. CODE Some other Code related issue and it should clearly describe what it is affecting in a comment. labels Jul 2, 2018
@Martii Martii merged commit ca86ab3 into OpenUserJS:master Jul 2, 2018
@Martii Martii deleted the alternateTTL branch July 2, 2018 08:25
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CODE Some other Code related issue and it should clearly describe what it is affecting in a comment. DB Pertains inclusively to the Database operations. enhancement Something we do have implemented already but needs improvement upon to the best of knowledge. UI Pertains inclusively to the User Interface.
Development

Successfully merging this pull request may close these issues.

1 participant