Answer the question
In order to leave comments, you need to log in
Which solution to use for caching function results?
Good afternoon.
There is a desire to cache the result of executing a function that is engaged in resource-intensive calculations.
I want to cache in Redis.
Can you please tell me what is the best approach?
Who uses what for such tasks?
Of the options that I imagine now:
- write your own decorator (you can, but I would like some more standard solution)
- use some ready-made solution (so far I found pythonhosted.org/django-memoize/)
I will be glad to see your links and suggestions.
Thank you.
Answer the question
In order to leave comments, you need to log in
There are positive experiences with django-cacheops . Habré has a rather useful, albeit rather old, article on usage and configuration.
To use Redis + Django
https://github.com/niwinz/django-redis There is also a link
to
the docks there:
niwinz.github.io/django-redis/latest
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question