Navigation Menu

Skip to content

Commit

Permalink
Cache binary_logs variable
Browse files Browse the repository at this point in the history
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
  • Loading branch information
madhuracj committed Nov 10, 2014
1 parent 686924d commit a1c1590
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions libraries/Menu.class.php
Expand Up @@ -511,13 +511,18 @@ private function _getServerTabs()
$notDrizzle = ! defined('PMA_DRIZZLE')
|| (defined('PMA_DRIZZLE') && ! PMA_DRIZZLE);
if (isset($GLOBALS['dbi']) && $notDrizzle) {
$binary_logs = $GLOBALS['dbi']->fetchResult(
'SHOW MASTER LOGS',
'Log_name',
null,
null,
PMA_DatabaseInterface::QUERY_STORE
);
if (PMA_Util::cacheExists('binary_logs')) {
$binary_logs = PMA_Util::cacheGet('binary_logs');
} else {
$binary_logs = $GLOBALS['dbi']->fetchResult(
'SHOW MASTER LOGS',
'Log_name',
null,
null,
PMA_DatabaseInterface::QUERY_STORE
);
PMA_Util::cacheSet('binary_logs', $binary_logs);
}
}

$tabs = array();
Expand Down

0 comments on commit a1c1590

Please sign in to comment.