Re: [web2py] How to retrieve info about sessions when they are stored in Redis?

2018-04-15 Thread Lisandro
Thank you very much Richard! With your help I was able to retrieve the keys of the sessions stored in Redis with this simple line of code: session_keys = cache.redis.r_server.smembers('w2p:sess:%s:id_idx' % application_name) That line returns a set with all the session keys stored in Redis.

Re: [web2py] How to retrieve info about sessions when they are stored in Redis?

2018-04-11 Thread Richard Vézina
I gave a look directly in the redis shell redis-cli -h localhost -p 6379 -a PASSWORD_IF_YOU_SET_ONE It appears that each session store will have a different key which goes like that : w2p:sess:APP_NAME:SOME_ID And w2p:sess:APP_NAME:id_idx will contains a set of each unique session existings, so

[web2py] How to retrieve info about sessions when they are stored in Redis?

2018-04-08 Thread Lisandro
Recently I moved the sessions from the database to Redis, and I'm wondering: is there a way to retrieve info about sessions when they are stored in Redis? For example, when sessions are stored in the database, you have the option to use SQL to do some stuff like counting or deleting sessions.