Update webpagetool.php

This commit is contained in:
Namhyeon Go 2019-11-14 14:57:16 +09:00 committed by GitHub
parent 941e6569c5
commit c7b17838c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -501,15 +501,16 @@ 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
)); ));
write_common_log("cache_max_age: " . $cache_max_age, "helper/webpagetool");
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"); write_common_log(sprintf("Cache hit. %s, %s, %s", $identifier, strlen($content), strlen($gz_content)), "helper/webpagetool");
} else { } else {
write_common_log(sprintf("Cache no hit. %s", $identifer), "helper/webpagetool"); write_common_log(sprintf("Cache no hit. %s", $identifier), "helper/webpagetool");
} }
} }