/** * Returns the cache identifier for the mail. * * @param \Drupal\simplenews\Mail\MailInterface $mail * The mail object. * * @return string */ protected function getCid(MailInterface $mail) { $entity_id = $mail->getEntity()->id(); return $mail->getEntity()->getEntityTypeId() . ':' . $entity_id . ':' . $mail->getLanguage(); }