private function setEntityManager()
    {
        try {
            if ($this->_instance_options['em'] instanceof EntityManager) {
                $this->_em = $this->_instance_options['em'];
            } else {
                $this->_em = EntityManagerCreator::create($this->_instance_options['dbal'], $this->getLogger());
            }
        } catch (InvalidArgumentException $e) {
            throw new CacheException('DAO cache: enable to create a database conneciton', CacheException::INVALID_DB_CONNECTION, $e);
        }

        return $this;
    }