A
A
arblog2015-07-10 10:55:17
Django
arblog, 2015-07-10 10:55:17

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

2 answer(s)
M
marazmiki, 2015-07-10
@marazmiki

There are positive experiences with django-cacheops . Habré has a rather useful, albeit rather old, article on usage and configuration.

D
dovgalmichael, 2015-07-10
@dovgalmichael

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 question

Ask a Question

731 491 924 answers to any question