Re: Using redis in django views

2012-02-05 Thread Ashe
Hello, The main reason for my issue, was because I was using two tabs on my browser. If I use two browsers or two different IP, my code works asynchronously (with gevent and apache, not with runserver but this isn't a surprise). I think there is something like: if a unique session asks for the sa

Re: Using redis in django views

2012-02-04 Thread Ashe
Hello, I just tried with django-redis by using redis as a cache. CACHES = {     'default': {         'BACKEND': 'redis_cache.RedisCache',         'LOCATION': '/tmp/vgbet_redis.sock',         'OPTIONS': {             'DB': 1,             'PASSWORD': None,             'PARSER_CLASS': 'redis.connect

Using redis in django views

2012-02-04 Thread Ashe
Hello, I'm trying to use redis (with redis-py) directly on some of my critical views to lock them. A simple version of the code could look like that : def test_view(request): --connec = redis.Redis(unix_socket_path='/tmp/vgbet_redis.sock') --if connec.exists('test'): print 'Already locked' --