You are here

public function SimplenewsSourceCacheStatic::get in Simplenews 7.2

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

Implements SimplenewsSourceNodeInterface::get().

Overrides SimplenewsSourceCacheInterface::get

File

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

Class

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

Code

public function get($group, $key) {
  if (!$this
    ->isCacheable($group, $key)) {
    return;
  }
  if (isset(self::$cache[$this
    ->getCid()][$group][$key])) {
    return self::$cache[$this
      ->getCid()][$group][$key];
  }
}