PMA\libraries\Util::cacheExists PHP Method

cacheExists() public static method

Verifies if something is cached in the session
public static cacheExists ( string $var ) : boolean
$var string variable name
return boolean
    public static function cacheExists($var)
    {
        return isset($_SESSION['cache']['server_' . $GLOBALS['server']][$var]);
    }

Usage Example

 /**
  * Checks if this database server is running on Amazon RDS.
  *
  * @return boolean
  */
 public function isAmazonRds()
 {
     if (Util::cacheExists('is_amazon_rds')) {
         return Util::cacheGet('is_amazon_rds');
     }
     $sql = 'SELECT @@basedir';
     $result = $this->fetchResult($sql);
     $rds = $result[0] == '/rdsdbbin/mysql/';
     Util::cacheSet('is_amazon_rds', $rds);
     return $rds;
 }
All Usage Examples Of PMA\libraries\Util::cacheExists
Util