File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1313
1414class ServerMetric {
1515
16- const CACHE_UPTIME_TTL = 300 ;
16+ const CACHE_RESPONSE_TIME_TTL = 300 ;
17+ const CACHE_UPTIME_TTL = 300 ;
1718
1819 public static function getLatestResponseTime ($ server_id ) {
19- $ cache_key = "bnetdocs-servermetric-lastms - " . (int ) $ server_id ;
20+ $ cache_key = "bnetdocs-servermetric-responsetime - " . (int ) $ server_id ;
2021 $ cache_val = Common::$ cache ->get ($ cache_key );
2122 if ($ cache_val !== false ) return $ cache_val ;
2223 if (!isset (Common::$ database )) {
@@ -35,7 +36,7 @@ public static function getLatestResponseTime($server_id) {
3536 Common::$ cache ->set (
3637 $ cache_key ,
3738 $ obj ->response_time ,
38- self ::CACHE_UPTIME_TTL
39+ self ::CACHE_RESPONSE_TIME_TTL
3940 );
4041 return $ obj ->response_time ;
4142 }
You can’t perform that action at this time.
0 commit comments