Abhishek Jindal
Abhishek Jindal

Reputation: 41

How can I use Redis cache based storage in our django Rest framework project?

I am developing an application in which user can add, delete , retrieve or update the transactions. I want to store transactions data in the redis cache based storage to improve the performance, what steps should I follow to achieve this?

Upvotes: 4

Views: 3584

Answers (2)

Alex T
Alex T

Reputation: 4659

I highly recommend you to check out cacheops django package.

https://github.com/Suor/django-cacheops

It has build in functionality for automatic/manual query/view/template sections/function caching as well as get/set primitives for simple cache by key.

Upvotes: 3

Denis Olehov
Denis Olehov

Reputation: 192

There is a Django Redis package that might help you. If you want to automatically cache all querysets (e.g. on SELECT ... operations) you may also use this package with django-redis as a cache backend. Both of above will work with Django Rest Framework.

Upvotes: 0

Related Questions