/**
  * Returns associative array with information about current session.
  *
  * */
 public static function apiCurrentSession(Request $r = null)
 {
     if (defined('OMEGAUP_SESSION_CACHE_ENABLED') && OMEGAUP_SESSION_CACHE_ENABLED === true && !is_null(self::$current_session)) {
         return self::$current_session;
     }
     if (is_null($r)) {
         $r = new Request();
     }
     if (is_null($r['auth_token'])) {
         $r['auth_token'] = SessionController::getAuthToken($r);
     }
     $authToken = $r['auth_token'];
     if ($authToken != null && defined('OMEGAUP_SESSION_CACHE_ENABLED') && OMEGAUP_SESSION_CACHE_ENABLED === true) {
         Cache::getFromCacheOrSet(Cache::SESSION_PREFIX, $authToken, $r, array('SessionController', 'getCurrentSession'), $session, APC_USER_CACHE_SESSION_TIMEOUT);
         self::$current_session = $session;
     } else {
         self::$current_session = SessionController::getCurrentSession($r);
     }
     return self::$current_session;
 }