Skip to content

Commit

Permalink
Update webpagetool.php
Browse files Browse the repository at this point in the history
  • Loading branch information
gnh1201 authored Nov 14, 2019
1 parent 941e656 commit c7b1783
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions helper/webpagetool.php
Original file line number Diff line number Diff line change
Expand Up @@ -501,15 +501,16 @@ function get_web_cache($url, $method="get", $data=array(), $proxy="", $ua="", $c
$identifier = get_web_identifier($url, $method, $data);
$gz_content = read_storage_file($identifier, array(
"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) {
$content = gzinflate($gz_content);
$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");
write_common_log(sprintf("Cache no hit. %s", $identifier), "helper/webpagetool");
}
}

Expand Down

0 comments on commit c7b1783

Please sign in to comment.