public function SystemTestController::system_test_cache_maxage_page in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php \Drupal\system_test\Controller\SystemTestController::system_test_cache_maxage_page()
Set cache max-age on the returned render array.
1 string reference to 'SystemTestController::system_test_cache_maxage_page'
- system_test.routing.yml in core/
modules/ system/ tests/ modules/ system_test/ system_test.routing.yml - core/modules/system/tests/modules/system_test/system_test.routing.yml
File
- core/
modules/ system/ tests/ modules/ system_test/ src/ Controller/ SystemTestController.php, line 229 - Contains \Drupal\system_test\Controller\SystemTestController.
Class
- SystemTestController
- Controller routines for system_test routes.
Namespace
Drupal\system_test\ControllerCode
public function system_test_cache_maxage_page() {
$build['main'] = array(
'#cache' => array(
'max-age' => 90,
),
'message' => array(
'#markup' => 'Cache max-age page example',
),
);
return $build;
}