You are here

public function TourHelpSection::getCacheMaxAge in Drupal 8

Same name and namespace in other branches
  1. 9 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\HelpSection

Code

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;
}