'cached_permissions will generate the cache in a lazy fashion.'

@property
def _user_group_perm_cache(self):

    if (not self.user):
        return {}
    cache_filled = getattr(self.user, '_authority_perm_cache_filled', False)
    if cache_filled:
        return self.user._authority_group_perm_cache
    self._prime_user_perm_caches()
    return self.user._authority_group_perm_cache
