The redirection is fine (302 should not cause caching problems, since 302 are temporary), but why do you need to redirect to both if and another. It is best to redirect to the login page if you are not logged in, otherwise the view should return a response instead of an unnecessary redirect, for example.
def home(request):
if not logged_in:
return HttpResponseRedirect("/login?next=%s"%reverse("home"))
return HttpResponse(...)
, , , djago auth l ogin_required , .
, URL- , , .