I try understand how redis support should work.
In the contrib web2py code I see function RConn() with code inside:
> instance_name = 'redis_conn_' + current.request.application
if not hasattr(RConn, instance_name):
setattr(RConn, instance_name, StrictRedis(*args, **vars))
It looks like this should separate (isolate) redis/StrictRedis instances by
request.application.
However, if I create 2 redis/StrictRedis instances and save them as 2
different variables,
they will share same data.
To really separate them, I need set different db=NNN parameter:
r1 = StrictRedis()
r2 = StrictRedis()
will be same,
but
r1 = StrictRedis(db=1)
r2 = StrictRedis(db=2)
will be different.
So, is the per application isolation really working?
--
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.