def test_cache_invalidation(self):
        set_permission_cache(self.user_normal, "can_change", [self.home_page.id])

        self.home_page.save()
        cached_permissions = get_permission_cache(self.user_normal, "can_change")
        self.assertIsNone(cached_permissions)
Test permission cache clearing on page save
dataset/ETHPy150Open divio/django-cms/cms/tests/test_permissions.py/PermissionCacheTests.test_cache_invalidation