This two line patch allows the pre-process function to do its own testing on $path and bail if it needs to.

This will be useful to get Boost working with i18n as currently you need to hack boost_cache_set()

CommentFileSizeAuthor
boost_pre_process_can_bail.diff868 bytesdalin

Comments

dalin’s picture

And the corresponding pre-process function that an i18n site would then use would be:

/**
 * Boost pre-process function.
 *
 * We use this to avoid caching non-i18n prefixed URLs.
 *
 * @arg string $data
 *  What Boost is about to cache to disk.
 * @arg string $path
 *  What URL are we at.
 * @return string
 *  Either $data, or nothing.
 */
function project350_boost_pre_process($data, $path) {
  if (module_exists('i18n') && i18n_get_lang_prefix($path)) {
    return $data;
  }
}
aaron’s picture

subscribe

mikeytown2’s picture

Status: Needs review » Closed (fixed)

Closing all 5.x issues; will only reevaluate if someone steps up #454652: Looking for a co-maintainer - 5.x

Reason is 6.x has 10x as many users as 5.x; also last 5.x dev was over a year ago. The 5.x issue queue needs to go.