You are here

protected function AuthcacheBuiltinTestCacheBackend::buildRequestHeaders in Authenticated User Page Caching (Authcache) 7.2

Setup HTTP headers for the request.

Parameters

int $flags: A combination of the following bits:

Return value

array List of request headers.

10 calls to AuthcacheBuiltinTestCacheBackend::buildRequestHeaders()
AuthcacheBuiltinTestCacheBackend::testCacheMaxAge in modules/authcache_builtin/tests/authcache_builtin.cache-backend.test
Test cache-response with page_cache_maximum_age.
AuthcacheBuiltinTestCacheBackend::testCachePreclusion in modules/authcache_builtin/tests/authcache_builtin.cache-backend.test
Preclusion: Suppress subsequent page request being delivered from cache.
AuthcacheBuiltinTestCacheBackend::testCacheRoundtrip in modules/authcache_builtin/tests/authcache_builtin.cache-backend.test
Test simple cache roundtrip for anonymous and authenticated users.
AuthcacheBuiltinTestCacheBackend::testDeliverThroughBackend in modules/authcache_builtin/tests/authcache_builtin.cache-backend.test
Test that cached pages can be served through the test front controller.
AuthcacheBuiltinTestCacheBackend::testDisableWhenCorePageCachingActive in modules/authcache_builtin/tests/authcache_builtin.cache-backend.test
Ensure that backend is disabled when core page cache is active.

... See full list

File

modules/authcache_builtin/tests/authcache_builtin.cache-backend.test, line 80
Test cases for the Authcache Bultin Cache Backend module.

Class

AuthcacheBuiltinTestCacheBackend
Tests update functionality unrelated to the database.

Code

protected function buildRequestHeaders($flags) {
  $result = array();
  if ($flags & 0x1) {
    $result[] = 'X-Authcache-Builtin-Test-Cache-Backend: 1';
  }
  if ($flags & 0x2) {
    $result[] = 'X-Authcache-Builtin-Test-Max-Age: 3600';
  }
  return $result;
}