Commit 2554af7a authored by mikeytown2's avatar mikeytown2

If not caching query string then do not cache url with only a ? in it.

parent 3d7c9537
......@@ -2381,6 +2381,7 @@ function boost_headers_contain($text) {
* uses $GLOBALS['_boost_query'] as well
*/
function boost_is_cacheable($path) {
global $base_root;
$is_front = FALSE;
if (empty($path)) {
$is_front = TRUE;
......@@ -2397,6 +2398,7 @@ function boost_is_cacheable($path) {
$decoded = $decoded2;
unset($decoded2);
unset($decoded1);
$url = $base_root . request_uri();
// Never cache
// the user login/registration/password/reset pages
......@@ -2433,7 +2435,7 @@ function boost_is_cacheable($path) {
if (!BOOST_CACHE_XML && (preg_match('!/feed$!', $normal_path) || preg_match('!\.xml$!', $normal_path))) {
return FALSE;
}
if (!BOOST_CACHE_QUERY && $GLOBALS['_boost_query'] != BOOST_CHAR) {
if (!BOOST_CACHE_QUERY && ($GLOBALS['_boost_query'] != BOOST_CHAR || strstr($url, '?') !== FALSE)) {
return FALSE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment