You are here

function SimplenewsSourceCacheInterface::get in Simplenews 7

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

Return a cached element, if existing.

Although group and key can be used to identify the requested cache, the implementations are responsible to create a unique cache key themself using the $source. For example based on the node id and the language.

Parameters

$group: Group of the cache key, which allows cache implementations to decide what they want to cache. Currently used groups:

  • data: Raw data, e.g. attachments.
  • build: Built and themed content, before personalizations like tokens.
  • final: The final returned data. Caching this means that newsletter can not be personalized anymore.

$key: Identifies the requested element, e.g. body, footer or attachments.

1 method overrides SimplenewsSourceCacheInterface::get()
SimplenewsSourceCacheStatic::get in includes/simplenews.source.inc
Implements SimplenewsSourceNodeInterface::get().

File

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

Class

SimplenewsSourceCacheInterface
Interface for a simplenews source cache implementation.

Code

function get($group, $key);