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 13
13
14
14
class ServerMetric {
15
15
16
- const CACHE_UPTIME_TTL = 300 ;
16
+ const CACHE_RESPONSE_TIME_TTL = 300 ;
17
+ const CACHE_UPTIME_TTL = 300 ;
17
18
18
19
public static function getLatestResponseTime ($ server_id ) {
19
- $ cache_key = "bnetdocs-servermetric-lastms - " . (int ) $ server_id ;
20
+ $ cache_key = "bnetdocs-servermetric-responsetime - " . (int ) $ server_id ;
20
21
$ cache_val = Common::$ cache ->get ($ cache_key );
21
22
if ($ cache_val !== false ) return $ cache_val ;
22
23
if (!isset (Common::$ database )) {
@@ -35,7 +36,7 @@ public static function getLatestResponseTime($server_id) {
35
36
Common::$ cache ->set (
36
37
$ cache_key ,
37
38
$ obj ->response_time ,
38
- self ::CACHE_UPTIME_TTL
39
+ self ::CACHE_RESPONSE_TIME_TTL
39
40
);
40
41
return $ obj ->response_time ;
41
42
}
You can’t perform that action at this time.
0 commit comments