public function generateCacheId()
    {
        if (!$this->getCurrentView()) {
            throw new \Exception(sprintf(
                'Cannot generate an hash for widget %s if currentView is not defined.',
                $this->getId()
            ));
        }

        return sprintf(
            '%s-%s-%s',
            $this->getId(),
            $this->getUpdatedAt()->getTimestamp(),
            $this->getCurrentView()->getReference()->getId()
        );
    }