Suggestions on how I should handle licensing in a session

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Suggestions on how I should handle licensing in a session

John Sanderbeck
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?

John

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9bbe311f-fcda-45bb-8357-10f14ebde9ea%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Suggestions on how I should handle licensing in a session

Walter Lee Davis
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.

Walter

> On Mar 13, 2020, at 10:16 AM, John Sanderbeck <[hidden email]> wrote:
>
> 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?
>
> John
>
> --
> 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 [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9bbe311f-fcda-45bb-8357-10f14ebde9ea%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0DEE97B2-EE1F-444D-B323-EF94125FBE75%40wdstudio.com.