function SimplenewsSourceCacheBuild::isCacheable in Simplenews 7.2
Same name and namespace in other branches
- 7 includes/simplenews.source.inc \SimplenewsSourceCacheBuild::isCacheable()
Implements SimplenewsSourceCacheStatic::set().
Overrides SimplenewsSourceCacheStatic::isCacheable
File
- includes/
simplenews.source.inc, line 1004 - Contains SimplenewsSource interface and implementations.
Class
- SimplenewsSourceCacheBuild
- Source cache implementation that caches build and data element.
Code
function isCacheable($group, $key) {
// Only cache for anon users.
if (user_is_logged_in()) {
return FALSE;
}
// Only cache data and build information.
return in_array($group, array(
'data',
'build',
));
}