private function invalidateCacheableObject(UnitOfWork $uow, $object)
    {
        $fields = array_keys($uow->getEntityChangeSet($object));
        $checkFields = ['roles'];

        if ($object instanceof RoleHierarchicalInterface || $object instanceof OrganizationUserInterface) {
            $checkFields = array_merge($checkFields, ['name']);
        }

        foreach ($fields as $field) {
            if (\in_array($field, $checkFields, true)) {
                return $this->getPrefix($object);
            }
        }

        return false;
    }