'Prime both the user and group caches and put them on the ``self.user``.
In addition add a cache filled flag on ``self.user``.'

def _prime_user_perm_caches(self):

    (perm_cache, group_perm_cache) = self._get_user_cached_perms()
    self.user._authority_perm_cache = perm_cache
    self.user._authority_group_perm_cache = group_perm_cache
    self.user._authority_perm_cache_filled = True
