You are here

function ape_help in Advanced Page Expiration 8

Same name and namespace in other branches
  1. 7 ape.module \ape_help()

Implements hook_help().

File

./ape.module, line 16
Allows finer control of the Cache Control header.

Code

function ape_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'ape.admin':
      return '<p>' . t('Configure the max age header based on path and other criteria.') . '</p>';
    case 'help.page.ape':
      $output = '';
      $output .= '<p>' . t('The advanced page expiration module is a lightweight solution to allow the max age header (used by external caching mechanisms such as Varnish) to be set based on different criteria, such as path or redirect code. This allows for more advanced scenarios such as having the homepage expire every five minutes while the rest of the site expires in one hour.') . '</p>';
      $output .= '<p>' . t('The <a href="@settings">settings page</a> explains the different options available. There is also Rules integration and an alter hook available for more complex integrations.', array(
        '@settings' => Url::fromRoute('ape.admin')
          ->toString(),
      )) . '</p>';
      return $output;
  }
}