Questions tagged [django-redis]
105 questions
0
votes
0 answers
django change cache settings when testing
I'm using redis as my cache server. When a user created , the post_save signal will save his information in redis with key="user_info_". However, when I run the unit test and create the user, the information will be overwritten. How can I…

ramwin
- 5,803
- 3
- 27
- 29
0
votes
0 answers
How to cache all site pages with Redis in Django?
Is it possible to cache all site pages automatically with Redis in Django? I'm using django-redis package. How could I implement a function to scan all urls and cache each one?

msampaio
- 3,394
- 6
- 33
- 53
0
votes
1 answer
can't locate what's causing RemovedInDjango110Warning
I got this in my log, after upgrading python from 2.7 to 3.5, there is no full stack trace, I'm not sure how to fix this.
/root/.virtualenvs/python3/lib/python3.5/site-packages/django/template/loader.py:97: RemovedInDjango110Warning: render() must…

Mzq
- 1,796
- 4
- 30
- 65
0
votes
0 answers
What could be wrong running django locally, in terms of session caching?
There seems to be a problem with redis, even though i've ran the same application successfully with the same django settings.
In settings.py, my database settings are as such:
**
if os.environ.get('REDIS_URL'):
CACHES['default'] = {
…

Austin
- 19
- 1
- 8
0
votes
1 answer
Django-redis-cache failing to fetch data from redis
I have a question regarding the working of this package. How does it writes to redis db ?
This is my settings for redis -
CACHES = {
'default': {
'BACKEND': 'redis_cache.RedisCache',
'LOCATION': '/var/run/redis/redis.sock',
…

Luv33preet
- 1,686
- 7
- 33
- 66
0
votes
1 answer
django- how can i save data in redis with django with custom key?
i want to delete some specific data after model.save() fired.
i use "post_save()" signal.
when I use cache_page() decorator in my views.py, data will save in redis with keys like this:…

msln
- 1,318
- 2
- 19
- 38
0
votes
1 answer
Unable to edit Redis.conf file in ubuntu 16.04 LTE?
I installed Redis in Ubuntu 16.04 LTE and during configuration i have to edit redis.conf file, but unfortunately i could not be able to save the file, because file is having read-only access
-rw-r--r-- 1 root root 46695 Jan 18 19:57 redis.conf
I…

Srinivas 25
- 63
- 2
- 6
0
votes
0 answers
Target machine refused connection for cache in Django
I am trying the code in the django-redis documentation page (http://niwinz.github.io/django-redis/latest/#_expire_persist):
from django.core.cache import cache
cache.set("foo", "value", timeout=25)
I am getting an error message when running this…

Alex
- 3,946
- 11
- 38
- 66
0
votes
0 answers
django , redis - the values getting flushed when redis restarts
I'm using
Redis 2.2.12
django-redis==3.8.4
django 1.7
settings.py
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379/",
} }
python manage.py shell
from django.core.cache import…

Anish Menon
- 789
- 11
- 26
0
votes
2 answers
redis not connected with django-redis
i have set a query set in my cache as :
cache.set('person',Lecture_Detail.objects.all())
in my views:
from django.core.cahe import cache
t3=datetime.datetime.now()
list(Lecture_Detail.objects.all())
t5 = datetime.datetime.now()
print "time…

Sumit Singh
- 23
- 6
0
votes
1 answer
fetch all keys from redis which are having some string into it
I am having some data stored in redis with below given keys
I have stored some keys into redis like
key1 = https://abc.net/v/140225014843/css/
key2 = https://abc.net/v/153729007613/css/
key3 = https://abc.net/v/240125414249/css/
key4 =…

Prashant Gaur
- 9,540
- 10
- 49
- 71
0
votes
1 answer
Django cache stores different key on get params
I am using django cache with django-redis-cache as a backend.
with:
@cache_page(60*60*24)
decorator on views.
Now the issue I am facing is every get request is being stored with a different key in redis.
I have to display the same page for any…

crazydiv
- 812
- 9
- 30
-1
votes
1 answer
How to see keys set by django-ratelimit in redis server?
I am using the following
django==3.1.3
django-ratelimit==3.0.1
django-redis==4.12.1
djangorestframework==3.12.2
I am trying to set up a rate-limit to limit the number of times a POST request is called.
I have this in my settings:
CACHES = {
…

BK0090
- 59
- 7
-1
votes
1 answer
Where do I put code to push data from database to redis for django-redis?
There is some data from database which is rarely changing and needs to be stored in redis. I know how to setup the redis-py and django-redis. I know how to set key and values and get them. But the question is the setting of data is to be universal…

Vedant Jain
- 11
- 7
-1
votes
1 answer
How to use django-redis package?
I am new to redis(No-SQL). I am using django-redis package in my project. How to configure database settings in my settings.py file ?. Is there way need to use other databases like MySql etc. If any one knows please explain me. Thanks.

dhana
- 6,487
- 4
- 40
- 63