function TourHelpSection::getCacheMaxAge
Same name in other branches
- 8.9.x core/modules/tour/src/Plugin/HelpSection/TourHelpSection.php \Drupal\tour\Plugin\HelpSection\TourHelpSection::getCacheMaxAge()
- 10 core/modules/tour/src/Plugin/HelpSection/TourHelpSection.php \Drupal\tour\Plugin\HelpSection\TourHelpSection::getCacheMaxAge()
- 11.x core/modules/tour/src/Plugin/HelpSection/TourHelpSection.php \Drupal\tour\Plugin\HelpSection\TourHelpSection::getCacheMaxAge()
Overrides UnchangingCacheableDependencyTrait::getCacheMaxAge
File
-
core/
modules/ tour/ src/ Plugin/ HelpSection/ TourHelpSection.php, line 64
Class
- TourHelpSection
- Provides the tours list section for the help page.
Namespace
Drupal\tour\Plugin\HelpSectionCode
public function getCacheMaxAge() {
// The calculation of which URL (if any) gets put on which tour depends
// on a route access check. This can have a lot of inputs, including user
// permissions and other factors. Rather than doing a complicated
// accounting of the cache metadata for all of these possible factors, set
// the max age of the cache to zero to prevent using incorrect cached
// information.
return 0;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.