function ConfigOverrideIntegrationTestCacheContext::getCacheableMetadata

Same name in other branches
  1. 9 core/modules/config/tests/config_override_integration_test/src/Cache/ConfigOverrideIntegrationTestCacheContext.php \Drupal\config_override_integration_test\Cache\ConfigOverrideIntegrationTestCacheContext::getCacheableMetadata()
  2. 8.9.x core/modules/config/tests/config_override_integration_test/src/Cache/ConfigOverrideIntegrationTestCacheContext.php \Drupal\config_override_integration_test\Cache\ConfigOverrideIntegrationTestCacheContext::getCacheableMetadata()
  3. 10 core/modules/config/tests/config_override_integration_test/src/Cache/ConfigOverrideIntegrationTestCacheContext.php \Drupal\config_override_integration_test\Cache\ConfigOverrideIntegrationTestCacheContext::getCacheableMetadata()

Overrides CacheContextInterface::getCacheableMetadata

File

core/modules/config/tests/config_override_integration_test/src/Cache/ConfigOverrideIntegrationTestCacheContext.php, line 36

Class

ConfigOverrideIntegrationTestCacheContext
A cache context service intended for the config override integration test.

Namespace

Drupal\config_override_integration_test\Cache

Code

public function getCacheableMetadata() {
    // Since this depends on State this can change at any time and is not
    // cacheable.
    $metadata = new CacheableMetadata();
    $metadata->setCacheMaxAge(0);
    return $metadata;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.