@Override
 public HashedPassword getPassword(String user) {
   user = user.toLowerCase();
   Optional<PlayerAuth> pAuthOpt = cachedAuths.getIfPresent(user);
   if (pAuthOpt != null && pAuthOpt.isPresent()) {
     return pAuthOpt.get().getPassword();
   }
   return source.getPassword(user);
 }
  public DatasourceConnection getDatasourceConnection(
      DataSource datasource, String user, String pass) throws PageException {
    // pc=ThreadLocalPageContext.get(pc);
    if (StringUtil.isEmpty(user)) {
      user = datasource.getUsername();
      pass = datasource.getPassword();
    }
    if (pass == null) pass = "";

    // get stack
    DCStack stack = getDCStack(datasource, user, pass);

    // max connection
    int max = datasource.getConnectionLimit();
    synchronized (stack) {
      while (max != -1 && max <= _size(datasource)) {
        try {
          // stack.inc();
          stack.wait(10000L);

        } catch (InterruptedException e) {
          throw Caster.toPageException(e);
        }
      }

      while (!stack.isEmpty()) {
        DatasourceConnectionImpl dc = (DatasourceConnectionImpl) stack.get();
        if (dc != null && isValid(dc, Boolean.TRUE)) {
          _inc(datasource);
          return dc.using();
        }
      }
      _inc(datasource);
    }
    return loadDatasourceConnection(datasource, user, pass).using();
  }