#791830 by drewish: only do requirements check for presence of URL aliases at runtime
#711920 by jlboht: enable static caching
This release adds two lines to path.inc. The lines are shown below in case you want to put them in manually instead of re-patching.
// Not in the static variable. Try cache.
$cid = $path . $path_language;
$cache = cache_get($cid, 'cache_pathdst');
if ($cache) {
+ $map[$path_language][$path] = $cache->data;
return $cache->data;
}
// Get the most fitting result falling back with alias without language.
$alias = db_result(db_query("SELECT dst FROM {url_alias} WHERE src = '%s' AND language IN('%s', '') ORDER BY language DESC", $path, $path_language));
// Store in static variable in case we encounter the same system path again
// during this request.
$map[$path_language][$path] = $alias;
// Store in cache.
cache_set($cid, $alias, 'cache_pathdst', time() + variable_get('pathcache_expire', 43200)); // 12 hours
return $alias;
}
// When action is 'source' we are given a URL alias and need to return the
// Drupal path.
// Check $no_src for this $path in case we've already determined that there