Commit 12606d2b authored by Tim Graham's avatar Tim Graham
Browse files

[1.9.x] Fixed #26514 -- Documented that User.refresh_from_db() doesn't clear the permission cache.

Backport of 2c4c67af from master
parent 7df7039d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -285,6 +285,7 @@ the ``User`` from the database. For example::
        user.has_perm('myapp.change_bar')  # False

        # Request new instance of User
        # Be aware that user.refresh_from_db() won't clear the cache.
        user = get_object_or_404(User, pk=user_id)

        # Permission cache is repopulated from the database