You are here

public static function ExpireAPI::expireCustomPages in Cache Expiration 7.2

Create expiration urls for custom pages.

Parameters

$pages: Unformated string from user input raw.

$token_options: Options for token replacements.

Return value

array List of custom urls that should be flushed.

6 calls to ExpireAPI::expireCustomPages()
ExpireComment::expire in includes/expire.comment.inc
Executes expiration actions for comment.
ExpireFile::expire in includes/expire.file.inc
Executes expiration actions for file.
ExpireNode::expire in includes/expire.node.inc
Executes expiration actions for node.
ExpireTaxonomyTerm::expire in includes/expire.taxonomy_term.inc
Executes expiration actions for taxonomy term.
ExpireUser::expire in includes/expire.user.inc
Executes expiration actions for user.

... See full list

File

includes/expire.api.inc, line 334
Provides internal API for page cache flushes.

Class

ExpireAPI
@file Provides internal API for page cache flushes.

Code

public static function expireCustomPages($pages, $token_options) {
  $urls = array();
  $pages = explode("\n", $pages);
  foreach ($pages as $index => $page) {
    $page = trim($page);
    if (!empty($page)) {

      // Replace only urls with tokens.
      if (token_scan($page)) {
        $page = token_replace($page, $token_options);
      }
      $urls['custom-' . $index] = $page;
    }
  }
  return $urls;
}