Doctrine/ORM/Listener/RoleHierarchyListener.php
protected function invalidateCache(UnitOfWork $uow, $object)
    {
        if ($this->isCacheableObject($object)) {
            return $this->invalidateCacheableObject($uow, $object);
        }

        if ($object instanceof PersistentCollection && $this->isRequireAssociation($object->getMapping())) {
            return $this->getPrefix($object->getOwner());
        }

        return false;
    }
protected function invalidateCache(UnitOfWork $uow, $object)
    {
        if ($this->isCacheableObject($object)) {
            return $this->invalidateCacheableObject($uow, $object);
        }

        if ($object instanceof PersistentCollection && $this->isRequireAssociation($object->getMapping())) {
            return $this->getPrefix($object->getOwner());
        }

        return false;
    }
protected function invalidateCache ( UnitOfWork $ uow , $ object ) { if ( $ this -> isCacheableObject ( $ object ) ) { return $ this -> invalidateCacheableObject ( $ uow , $ object ) ; } if ( $ object instanceof PersistentCollection && $ this -> isRequireAssociation ( $ object -> getMapping ( ) ) ) { return $ this -> getPrefix ( $ object -> getOwner ( ) ) ; } return false ; }
Check if the role hierarchy cache must be invalidated.

@param UnitOfWork $uow    The unit of work
@param object     $object The object

@return false|string
Check if the role hierarchy cache must be invalidated .