Reputation: 41
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
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
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