You are here

function SimplenewsSourceCacheBuild::isCacheable in Simplenews 7

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

Implements SimplenewsSourceCacheStatic::set().

Overrides SimplenewsSourceCacheStatic::isCacheable

File

includes/simplenews.source.inc, line 941
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',
  ));
}