1👍
According to the Django docs:
In a newly created QuerySet, the cache is empty.
Thus, just begin using a new Queryset when you want to break the cache.
1👍
According to Django docs you can call .all()
on the QuerySet
:
When a QuerySet is evaluated, it typically caches its results. If the data in the database might have changed since a QuerySet was evaluated, you can get updated results for the same query by calling all() on a previously evaluated QuerySet.
- [Answered ]-Including urls of one app into urls file of another app in django
- [Answered ]-Django random sort list
Source:stackexchange.com