Skip to content

Commit

Permalink
No need to poll Internode's servers on every load -- get service deta…
Browse files Browse the repository at this point in the history
…ils only when refreshing data
  • Loading branch information
peterdey committed Dec 11, 2013
1 parent 9cc68d2 commit bb21902
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internode.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,6 @@ function internode() {
}

function init() {
$url = "https://".INTERNODE_HOST.INTERNODE_URI;
$this->get_service_id($url);

if(!file_exists(INTERNODE_CACHE))
$this->refresh_cache();
else if( filemtime(INTERNODE_CACHE) < (time() - 3600))
Expand All @@ -147,6 +144,9 @@ function init() {
}

function refresh_cache() {
$url = "https://".INTERNODE_HOST.INTERNODE_URI;
$this->get_service_id($url);

// Do we need to specify a number of days to get hysterical data for?
$count = (GRAPH_DAYS != 0) ? '?count=' . GRAPH_DAYS : '';

Expand Down

0 comments on commit bb21902

Please sign in to comment.