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

Limit tokens hash? #208

Closed
npearson72 opened this issue Apr 10, 2015 · 6 comments
Closed

Limit tokens hash? #208

npearson72 opened this issue Apr 10, 2015 · 6 comments

Comments

@npearson72
Copy link

I don't have a use case where the user will be hitting the server with multiple clients, but we do deploy changes often and it seems that resets the user's client, causing a new token to be saved to the the tokens field.

After a while, the number of tokens grows, and each request passes a lot of unneeded data.

Is there a way to limit the max number of tokens saved?

@ncri
Copy link

ncri commented Apr 17, 2015

+1 Why are there so many tokens saved in the user? If there is no limit, the field will overflow at some point.

@npearson72
Copy link
Author

@ncri I ended up writing my own solution for this. Aside from the unmanaged list of tokens, the overall performance of this gem is poor in my experience -- even with configuring it re-use the token per request.

Plus, it's not very well supported it seems.

@ncri
Copy link

ncri commented Apr 19, 2015

Oh dear. Well, I use this in conjunction with https://github.com/lynndylanhurley/j-toker. It works quite well so far, haven't noticed any issues, except the huge amount of tokens stored in the user.

@nicolas-besnard
Copy link
Contributor

@nickL The maximum size of a field this is 1GO - quite a lot of data ;)
@ncri What's your solution for this ?

@ncri
Copy link

ncri commented Apr 19, 2015

Oh, yes, it is, but they get loaded every time the user is loaded. That brings performance down. More and more as the number of tokens are growing. I wonder why so many need to be stored? Those are all old tokens, right? Why are they stored?

@ncri
Copy link

ncri commented May 3, 2015

Well, the tokens are only kept for 2 weeks and that timespan can be reduced via the config. So I don't see an issue here... ;-)

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

No branches or pull requests

3 participants