11.8.drf配置redis缓存
django-redis
使用指南请参考https://github.com/jazzband/django-redis
User guide
Installation
Install with pip:
Configure as cache backend
To start using django-redis, you should change your Django cache settings to something like:
django-redis uses the redis-py native URL notation for connection strings, it allows better interoperability and has a connection string in more "standard" way. Some examples:
redis://[:password]@localhost:6379/0
rediss://[:password]@localhost:6379/0
unix://[:password]@/path/to/socket.sock?db=0
Last updated
Was this helpful?