Egor Biriukov
Egor Biriukov

Reputation: 679

Redis for Django-application

I'm writing eCommerce web-application with Django 1.9.5. It will not be any close to highload, it's just a trivial application. My question is should I use Redis for following purposes:

What are pros and cons in these? Should I go with Redis+Celery or simply stick with classical caching backends and synchronous actions in views?

Upvotes: 1

Views: 60

Answers (1)

Alex T
Alex T

Reputation: 4659

I'm using cacheops for caching in all my django apps.

It gives build in query caching and invalidation on model updates.

All you need to add caching for all User related queries is to add to your settings.py few lines:

CACHEOPS = {
    'auth.user': {'ops': 'get', 'timeout': 60*15},
}

I assume you can add session caching in the same way.

If you doesn't expect highload on your project I'm sure it'll be enough.

Upvotes: 2

Related Questions