You are here

class AuthcacheP13nCacheGranularity in Authenticated User Page Caching (Authcache) 7.2

Cache granularity class.

Hierarchy

Expanded class hierarchy of AuthcacheP13nCacheGranularity

See also

AuthcacheP13nAddCacheControlHeaderFilter

AuthcacheP13nDefaultRequestUrlGenerator

2 string references to 'AuthcacheP13nCacheGranularity'
AuthcacheP13nTestRequestBuilder::testRequestResourcesNullFragments in modules/authcache_p13n/tests/authcache_p13n.request-builder.test
Cover authcache_p13n_request_resources().
authcache_p13n_authcache_p13n_base_request in modules/authcache_p13n/authcache_p13n.module
Implements hook_authcache_p13n_base_request().

File

modules/authcache_p13n/includes/AuthcacheP13nCacheGranularity.inc, line 13
Defines the cache granularity class.

View source
class AuthcacheP13nCacheGranularity {
  const PER_USER = 0x2;
  const PER_PAGE = 0x4;
  protected $granularity;

  /**
   * Construct new cache granularity instance.
   */
  public function __construct($granularity) {
    $this->granularity = $granularity;
  }

  /**
   * Test whether a given granularity is set.
   */
  public function is($flag) {
    return $this->granularity & $flag;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AuthcacheP13nCacheGranularity::$granularity protected property
AuthcacheP13nCacheGranularity::is public function Test whether a given granularity is set.
AuthcacheP13nCacheGranularity::PER_PAGE constant
AuthcacheP13nCacheGranularity::PER_USER constant
AuthcacheP13nCacheGranularity::__construct public function Construct new cache granularity instance.