Will & Skill Developers

Will & Skill Developers


Thoughts, snippets and ideas from the team at Will & Skill AB, Stockholm.

Faisal M
Author

“The mind is not a vessel to be filled, but a fire to be kindled.” ― Plutarch

Share


Tags


avrt

Redis as a caching backend for Django based projects

A tutorial for installing Redis and using it as the caching backend for Django Installing Redis on Ubuntu sudo apt-get install redis-server Make sure that you a…

Faisal MFaisal M

A tutorial for installing Redis and using it as the caching backend for Django

Installing Redis on Ubuntu

sudo apt-get install redis-server

Make sure that you are in the proper virtualenv

pip install django-redis-cache

In your settings.py add this snippet

CACHES = {
    'default': {
        'BACKEND': 'redis_cache.RedisCache',
        'LOCATION': 'localhost:6379',
        'OPTIONS': {
            'DB': 0,
        },
    },
}

That's it! You're done!

Faisal M
Author

Faisal M

“The mind is not a vessel to be filled, but a fire to be kindled.” ― Plutarch

View Comments