public function MailCacheNone::isCacheable in Simplenews 8
Same name and namespace in other branches
- 8.2 src/Mail/MailCacheNone.php \Drupal\simplenews\Mail\MailCacheNone::isCacheable()
- 3.x src/Mail/MailCacheNone.php \Drupal\simplenews\Mail\MailCacheNone::isCacheable()
Return if the requested element should be cached.
Parameters
\Drupal\simplenews\Mail\MailInterface $mail: The mail object.
string $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.
string $key: Identifies the requested element, e.g. body or attachments.
Return value
bool TRUE if it should be cached, FALSE otherwise.
Overrides MailCacheStatic::isCacheable
File
- src/
Mail/ MailCacheNone.php, line 15
Class
- MailCacheNone
- Cache implementation that does not cache anything at all.
Namespace
Drupal\simplenews\MailCode
public function isCacheable(MailInterface $mail, $group, $key) {
return FALSE;
}