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

This commit is contained in:
Tim Graham 2016-04-18 09:02:56 -04:00
parent 7ba7d203d8
commit 2c4c67af94
1 changed files with 1 additions and 0 deletions

View File

@ -284,6 +284,7 @@ the ``User`` from the database. For example::
user.has_perm('myapp.change_bar') # False user.has_perm('myapp.change_bar') # False
# Request new instance of User # 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) user = get_object_or_404(User, pk=user_id)
# Permission cache is repopulated from the database # Permission cache is repopulated from the database