private function warmUp(GroupexFormCacheInterface $entity) {
    $options = unserialize($entity->field_gfc_options->value);

    // If entity is not valid we should make it valid by providing dates.
    if (!$this->isValid($entity)) {
      // New options have to have the save start end interval.
      $offset = $options['query']['end'] - $options['query']['start'];

      $timezone = new \DateTimeZone($this->configFactory->get('system.date')->get('timezone')['default']);
      $datetime = new \DateTime('today midnight', $timezone);

      $options['query']['start'] = $datetime->getTimestamp();
      $options['query']['end'] = $datetime->getTimestamp() + $offset;
    }

    // Make a new request with appropriate options to create new cache entity.
    if (!is_null($this->request($options, FALSE))) {
      try {
        $entity->delete();
      }
      catch (\Exception $e) {
        $this->logger->notice('Possible race condition. Tried to delete an entity which does not exist');
      }
    }
  }