On Thursday, September 7, 2017 at 1:18:10 PM UTC-4, Alex Glaros wrote:
>
> is it theoretically possible to leverage redis as a sessions store so that 
> web2py session can hold many of the things normally kept on the db?
>
> For example, could you store things like email-contacts and high-use 
> lookup tables usually accessed as tables on the db, but now in session vars 
> in order to reduce hits to the db?  (Db would only be accessed if there was 
> any change to the tables represented by session vars.)
>

Keep in mind that the session is specific to each user, so you would only 
want to store data unique to each user. If you simply want to cache common 
database queries (that are not user specific), you can use the web2py cache 
system (including the DAL functionality to cache selects 
<http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Caching-selects>).
 
You can use Redis for caching as well as for sessions: 
http://web2py.com/books/default/chapter/29/13/deployment-recipes#Caching-with-Redis.

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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to