Update webpagetool.php
This commit is contained in:
parent
46c9d3d836
commit
d49894dd4f
|
|
@ -480,6 +480,8 @@ if(!check_function_exists("get_web_identifier")) {
|
||||||
$checksums[] = $checksum_header;
|
$checksums[] = $checksum_header;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//write_common_log(json_encode($checksums), "get_web_identifier");
|
||||||
|
|
||||||
return get_hashed_text(implode(".", $checksums));
|
return get_hashed_text(implode(".", $checksums));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -499,12 +501,15 @@ if(!check_function_exists("get_web_cache")) {
|
||||||
$identifier = get_web_identifier($url, $method, $data);
|
$identifier = get_web_identifier($url, $method, $data);
|
||||||
$gz_content = read_storage_file($identifier, array(
|
$gz_content = read_storage_file($identifier, array(
|
||||||
"storage_type" => "cache",
|
"storage_type" => "cache",
|
||||||
"max_age" => $cache_max_age
|
//"max_age" => $cache_max_age
|
||||||
));
|
));
|
||||||
|
|
||||||
if($gz_content !== false) {
|
if($gz_content !== false) {
|
||||||
$content = gzinflate($gz_content);
|
$content = gzinflate($gz_content);
|
||||||
$cache_hits++;
|
$cache_hits++;
|
||||||
|
write_common_log(sprintf("Cache hit. %s, %s, %s", $identifier, strlen($content), strlen($gz_content)), "helper/webpagetool");
|
||||||
|
} else {
|
||||||
|
write_common_log(sprintf("Cache no hit. %s", $identifer), "helper/webpagetool");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user