summaryrefslogtreecommitdiffstats
path: root/system/core/Output.php
diff options
context:
space:
mode:
authorStefano Mazzega <stefano.mazzega@gmail.com>2014-12-03 11:55:47 +0100
committerStefano Mazzega <stefano.mazzega@gmail.com>2014-12-03 11:55:47 +0100
commitac41ca63f7e7f9ce24a2c2f023e8e648c8a56634 (patch)
tree0c82613dbe23a6375319dbd49a8a4389e882ea72 /system/core/Output.php
parentf29c21e186a36351338297ae62eabb9ab8c4ec45 (diff)
add querystring to page caching. #2349
Diffstat (limited to 'system/core/Output.php')
-rw-r--r--system/core/Output.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/system/core/Output.php b/system/core/Output.php
index 8b7d6efbd..4743690c9 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -564,6 +564,9 @@ class CI_Output {
.$CI->config->item('index_page')
.$CI->uri->uri_string();
+ // append querystring
+ $uri .= (empty($_SERVER['QUERY_STRING'])) ? '' : '?' . $_SERVER['QUERY_STRING'];
+
$cache_path .= md5($uri);
if ( ! $fp = @fopen($cache_path, 'w+b'))
@@ -648,6 +651,9 @@ class CI_Output {
// Build the file path. The file name is an MD5 hash of the full URI
$uri = $CFG->item('base_url').$CFG->item('index_page').$URI->uri_string;
+ // append querystring
+ $uri .= (empty($_SERVER['QUERY_STRING'])) ? '' : '?' . $_SERVER['QUERY_STRING'];
+
$filepath = $cache_path.md5($uri);
if ( ! file_exists($filepath) OR ! $fp = @fopen($filepath, 'rb'))
@@ -727,6 +733,9 @@ class CI_Output {
$uri = $CI->uri->uri_string();
}
+ // append querystring
+ $uri .= (empty($_SERVER['QUERY_STRING'])) ? '' : '?' . $_SERVER['QUERY_STRING'];
+
$cache_path .= md5($CI->config->item('base_url').$CI->config->item('index_page').$uri);
if ( ! @unlink($cache_path))