4

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?

3
  • Did you read the very comprehensive docs on caching? Commented Feb 5, 2017 at 17:48
  • Yes, some comprehensive knowledge I have acquired by reading some docs Commented Feb 5, 2017 at 17:52
  • But I was not able to link the Django project to the Redis server and How I can use List or Sorted Sets of Redis in Django Commented Feb 5, 2017 at 17:53

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Like If I have to use Hash data type of redis in Django project, How can I use that?
Cacheops is a caching lib for general purposes usage. It provides very simple cache abstractions but there is no low level redis functionaity here. If you want to use specific redis components or implement caching strategies on your own you should use something else.
0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.