Skip to content
This repository was archived by the owner on Mar 8, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions manager/includes/document.parser.class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,12 @@ function checkCache($id) {
$tbl_document_groups= $this->getFullTableName("document_groups");
if ($this->config['cache_type'] == 2) {
$md5_hash = '';
if(!empty($_GET)) $md5_hash = '_' . md5(http_build_query($_GET));
if (!empty($_GET)) {
// Sort GET parameters so that the order of parameters on the HTTP request don't affect the generated cache ID.
$params = $_GET;
ksort($params);
$md5_hash = '_' . md5(http_build_query($params));
}
$cacheFile= "assets/cache/docid_" . $id .$md5_hash. ".pageCache.php";
}else{
$cacheFile= "assets/cache/docid_" . $id . ".pageCache.php";
Expand Down Expand Up @@ -771,7 +776,12 @@ function postProcess() {
$this->invokeEvent("OnBeforeSaveWebPageCache");
if ($this->config['cache_type'] == 2) {
$md5_hash = '';
if(!empty($_GET)) $md5_hash = '_' . md5(http_build_query($_GET));
if (!empty($_GET)) {
// Sort GET parameters so that the order of parameters on the HTTP request don't affect the generated cache ID.
$params = $_GET;
ksort($params);
$md5_hash = '_' . md5(http_build_query($params));
}
$pageCache = $md5_hash .".pageCache.php";
}else{
$pageCache = ".pageCache.php";
Expand Down