On Tuesday, November 3, 2015 at 2:04:21 PM UTC-5, Richard wrote:
>
> There is large amount of that data that why I have this concern...
>

You might want to do some testing (i.e., checking response times and RAM 
usage) before bothering to manage session keys. Note, the session data for 
a given user is only loaded into RAM during the period of a given request 
(in between requests, it resides in the session file).

If there is a large portion of the session that can safely be deleted at 
some point, feel free to do something like what you have suggested and just 
delete the relevant keys. One thing to keep in mind is that if the session 
doesn't change during a given request, web2py does not bother to write out 
to the session file, so if you do delete some keys, you will be prompted a 
file write during that request. The overhead of the extra file writes must 
therefore be balanced against the overhead of keeping the extra data in the 
session instead.
 

>
> Is cleaning the sessions/* files delete data put in session?
>

When you clean up session files, you are typically deleting files of 
sessions that have already expired (based on the Auth login expiration) 
and/or are presumed no longer to be active (based on the time since last 
modified). The entire file is deleted, so of course you lose all the data.

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