function SimplenewsSourceCacheInterface::set in Simplenews 7.2
Same name and namespace in other branches
- 7 includes/simplenews.source.inc \SimplenewsSourceCacheInterface::set()
Write an element to the cache.
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.
$data: The data to be saved in the cache.
1 method overrides SimplenewsSourceCacheInterface::set()
- SimplenewsSourceCacheStatic::set in includes/
simplenews.source.inc - Implements SimplenewsSourceNodeInterface::set().
File
- includes/
simplenews.source.inc, line 190 - Contains SimplenewsSource interface and implementations.
Class
- SimplenewsSourceCacheInterface
- Interface for a simplenews source cache implementation.
Code
function set($group, $key, $data);