You are here

class SimplenewsSourceCacheBuild in Simplenews 7

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

Source cache implementation that caches build and data element.

Hierarchy

Expanded class hierarchy of SimplenewsSourceCacheBuild

Related topics

3 string references to 'SimplenewsSourceCacheBuild'
SimplenewsSourceNode::initCache in includes/simplenews.source.inc
Initialize the cache implementation.
SimplenewsSourceTestCase::testSendCaching in tests/simplenews.test
Test sending a newsletter to 100 recipients with caching enabled.
simplenews_admin_settings_mail in includes/simplenews.admin.inc
Menu callback: Simplenews admin settings - Email.

File

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

View source
class SimplenewsSourceCacheBuild extends SimplenewsSourceCacheStatic {

  /**
   * Implements SimplenewsSourceCacheStatic::set().
   */
  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',
    ));
  }

}

Members

Namesort descending Modifiers Type Description Overrides
SimplenewsSourceCacheBuild::isCacheable function Implements SimplenewsSourceCacheStatic::set(). Overrides SimplenewsSourceCacheStatic::isCacheable
SimplenewsSourceCacheStatic::$cache protected static property The static cache.
SimplenewsSourceCacheStatic::$cid protected property The cache identifier for the given source.
SimplenewsSourceCacheStatic::$source protected property The simplenews source for which this cache is used.
SimplenewsSourceCacheStatic::get public function Implements SimplenewsSourceNodeInterface::get(). Overrides SimplenewsSourceCacheInterface::get
SimplenewsSourceCacheStatic::getCid protected function Returns the cache identifier for the current source.
SimplenewsSourceCacheStatic::set public function Implements SimplenewsSourceNodeInterface::set(). Overrides SimplenewsSourceCacheInterface::set
SimplenewsSourceCacheStatic::__construct public function Implements SimplenewsSourceNodeInterface::__construct(). Overrides SimplenewsSourceCacheInterface::__construct