Suggestions on how I should handle licensing in a session

Skip to first unread message

John Sanderbeck

Mar 13, 2020, 10:16:46 AM3/13/20
to Ruby on Rails: Talk
In an app I wrote I implemented licensing for the modules in the app.

Right now, I query the database every time the license is checked which is a ton of SQL calls per user per session...

How can I limit the lookup to once per session?

Just store it in the session hash?


Walter Lee Davis

Mar 13, 2020, 10:25:03 AM3/13/20
That's what I would do. It's very low-drag that way. If you are horizontally-scaled, then you need to ensure that you have a central session store.

> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> To view this discussion on the web visit

Reply all
Reply to author
0 new messages