#26514: User.refresh_from_db() does not clear Permission cache.
------------------------------+--------------------
     Reporter:  codingjoe     |      Owner:  nobody
         Type:  Bug           |     Status:  new
    Component:  contrib.auth  |    Version:  master
     Severity:  Normal        |   Keywords:
 Triage Stage:  Unreviewed    |  Has patch:  0
Easy pickings:  1             |      UI/UX:  0
------------------------------+--------------------
 User.refresh_from_db() does not clear the Permission cache.

 `ModelBackend` implements a cache for the Permission. This cache is not
 cleared or rebuild when calling `refresh_from_db()`.

 I find this very confusing and somewhat unexpected behavior. This should
 ether be documented or better the cache gets flushed when
 `refresh_from_db()` is called.

--
Ticket URL: <https://code.djangoproject.com/ticket/26514>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.9371139f9983f91b04d0d1bc5c437009%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to