You are here

protected function SimplenewsSourceCacheStatic::getCid in Simplenews 7.2

Same name and namespace in other branches
  1. 7 includes/simplenews.source.inc \SimplenewsSourceCacheStatic::getCid()

Returns the cache identifier for the current source.

File

includes/simplenews.source.inc, line 937
Contains SimplenewsSource interface and implementations.

Class

SimplenewsSourceCacheStatic
Abstract implementation of the source caching that does static caching.

Code

protected function getCid() {
  if (empty($this->cid)) {
    $entity_id = entity_id($this->source
      ->getEntityType(), $this->source
      ->getEntity());
    $this->cid = $this->source
      ->getEntityType() . ':' . $entity_id . ':' . $this->source
      ->getLanguage();
  }
  return $this->cid;
}