This particular error is a bug with trunk. I just fixed it. Whether you can
store session in redis or not is another issue. Niphlod is the expert on
that.
On Monday, 8 October 2012 09:48:52 UTC-5, rif wrote:
>
> Is the code bellow the correct way to create the sessions in redis?
>
> from gluon.contrib.memdb import MEMDB
> from gluon.contrib.redis_cache import RedisCache
> cache.redis = RedisCache('localhost:6379',db=None, debug=True)
> session.connect(request, response, db = MEMDB(cache.redis))
>
> If yes, there is an error:
>
> ERROR:web2py:Traceback (most recent call last):
> File "/home/rif/Documents/webframeworks/web2py/gluon/main.py", line 614,
> in wsgibase
> BaseAdapter.close_all_instances('rollback')
> File "/home/rif/Documents/webframeworks/web2py/gluon/dal.py", line 529,
> in close_all_instances
> THREAD_LOCAL.db_instances.clear()
> AttributeError: 'thread._local' object has no attribute 'db_instances'
>
>
--