panosl / django-currencies

django-currencies allows you to define different currencies, and includes template tags/filters to allow easy conversion between them.
http://pypi.python.org/pypi/django-currencies
BSD 3-Clause "New" or "Revised" License
94 stars 81 forks source link

Cache rates results until then db data will not change #78

Open anufry opened 4 years ago

anufry commented 4 years ago

Now it has so much DB queries as tag occurs in template

anufry commented 4 years ago

it will be ok to save cache here: https://github.com/panosl/django-currencies/blob/ad87df2bc5f3c88726f3108e5323530f3f23398b/currencies/utils.py#L7

and clear it on model save()

panosl commented 4 years ago

it will be ok to save cache here:

https://github.com/panosl/django-currencies/blob/ad87df2bc5f3c88726f3108e5323530f3f23398b/currencies/utils.py#L7

and clear it on model save()

If you want to create a pull request with what you have in mind, we can go over it and see if it can be incorporated.

anufry commented 4 years ago

Hello, I've created pull request, thank you for your attention!