On Monday, March 12, 2018 at 7:23:26 AM UTC-4, Manuele wrote:
>
> Il 07/03/18 15:51, Anthony ha scritto: 
> > Be aware, that will require a database select on every request. If you 
> > want to minimize the database hits, you could also store in the 
> > session the time of the last database lookup, and then only check the 
> > database every X minutes (the tradeoff being that it could take up to 
> > X minutes to disable the first session after the second session has 
> > begun -- if you must ensure zero overlap of sessions, then you'll have 
> > to do the database check on every request). 
>
> What if I cache on disk the result of a function that returns the 
> session id and I check if it corresponds to the real value?


Not sure what you mean. Where does the session ID produced by the function 
come from, and how is the "real value" defined? What are you suggesting 
different from Massimo's approach.

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to