Re: Best Queryset Practice

2015-06-22 Thread Paritosh Gupta
uent request. while when it does not have desired result it will hit the db and fetch it. correct me if i am wrong. Well let say i have 1 million rows, is it advisable to work this same manner as it will be caching all 1million result? On Monday, June 22, 2015 at 8:58:51 PM UTC+5:30, Paritosh G

Best Queryset Practice

2015-06-22 Thread Paritosh Gupta
Hello, Do advice me on: queryset = User.objects.all() user = get_object_or_404(pk=id) > Is it better to call the list in queryset and then apply filter or directly use .filter() in the first step. > If so, when we call all the object frequently does it cache and from cache we do filter or d