Determines if a URI has expired

@method expired
@private
@param  {Object} uri Cached URI object
@return {Boolean}    True if the URI has expired
511021
function ( uri ) {
		var item = cache.items[uri];

		return item !== undefined && item.expires !== undefined && item.expires < new Date();
	}
289068
function isDataURI(filename) {
  return String.prototype.startsWith ?
      filename.startsWith(dataURIPrefix) :
      filename.indexOf(dataURIPrefix) === 0;
}
1321609
function checkCache (config, pattern) {
	if (!useCache(config)) {
		return RESPONSE_UNKNOWN;
	}

	const valueRetrieved = kvGet(config, pattern);
	if (valueRetrieved === RESPONSE_UNKNOWN) {
		return RESPONSE_UNKNOWN;
	}
	/* Check if the cache entry has expired. */
	const lastValidDate = new Date(valueRetrieved.validUntil);
	if (lastValidDate <= Date.now()) {
		/* The cache entry has expired. */
		return RESPONSE_UNKNOWN;
	}
	return valueRetrieved.response;
}
1030702
function checkUriRaw(i) {
  const start = i;
  let l;

  while (i < tokensLength) {
    if (checkInterpolation(i) || checkVariable(i)) break;
    else if (l = checkUriRawCharacters(i)) i += l;
    else break;
  }

  tokens[start].uri_raw_end = i;

  return i - start;
}
282348
public Boolean isExpired(String token) {
        final Date expiration = getExpirationDateFromToken(token);
        return expiration.before(new Date());
    }
621983
@JsonIgnore
    protected boolean isRefreshTokenExpired(final TicketState ticketState) {
        if (ticketState == null) {
            return true;
        }
        val expiringTime = ticketState.getCreationTime().plus(this.timeToKillInSeconds, ChronoUnit.SECONDS);
        return expiringTime.isBefore(ZonedDateTime.now(ZoneOffset.UTC));
    }
713471
def expired(self):
    """"""
    expiry_time = self.expiry_time
    if expiry_time is not None:
      return expiry_time < rdfvalue.RDFDatetime.Now()
    else:
      return False
597893
public boolean matches(String uri) {
		if (uri == null) {
			return false;
		}
		Matcher matcher = this.matchPattern.matcher(uri);
		return matcher.matches();
	}
847090
protected function isExpired( $uri, $expires )
	{
		$edge	= time() - $expires;
		clearstatcache();
		return filemtime( $uri ) <= $edge;
	}
1218236
function flushExpired () {
  return storage.keys().then(keys => {
    const cacheKeys = keys.filter(key => key.indexOf(expire) === 0)
    return Promise.all(cacheKeys.map(key => get(key.slice(prefix.length))))
  })
}
629653
function callUri(uri) {
  var iframe = document.createElement('iframe');
  iframe.src = uri;
  iframe.style.display = 'none';
  document.documentElement.appendChild(iframe);
  setTimeout(function () {
    return document.documentElement.removeChild(iframe);
  }, 0);
}
1050281
function _isValidNodeURI(nodeURI) {
  if (!_isString(nodeURI)) return false

  try {
    let isValidURI = isURL(nodeURI, {
      protocols: ['http', 'https'],
      require_protocol: true,
      host_blacklist: ['0.0.0.0']
    })

    let parsedURI = url.parse(nodeURI).hostname

    // Valid URI w/ IPv4 address?
    return isValidURI && isIP(parsedURI, 4)
  } catch (error) {
    return false
  }
}
979576
public static void checkUri(String uri, String message, Object... args) {
    try {
      new URI(uri);
    } catch (URISyntaxException e) {
      throw new IllegalArgumentException(String.format(message, args), e);
    }
  }
1023053
function getUri2() {
  const startPos = pos;
  let content = [];

  while (pos < tokens[startPos].uri_end) {
    if (checkSC(pos)) content = content.concat(getSC());
    else if (checkUnary(pos)) content.push(getUnary());
    else if (_checkValue(pos)) content.push(_getValue());
    else break;
  }

  return content;
}
455063
@SuppressWarnings("ShortCircuitBoolean")
  boolean hasExpired(Node<K, V> node, long now) {
    return (expiresAfterAccess() && (now - node.getAccessTime() >= expiresAfterAccessNanos()))
        | (expiresAfterWrite() && (now - node.getWriteTime() >= expiresAfterWriteNanos()))
        | (expiresVariable() && (now - node.getVariableTime() >= 0));
  }
1316455
def page_expired?(page)
      return false if @options[:ttl_page].nil?
      stored_page = @storage.get(page)
      r = stored_page && stored_page.expired?(@options[:ttl_page])
      @logger.debug { "Page #{page.url} marked as expired" } if r
      r
    end
1007661
function ( uri ) {
		var obj    = {},
		    parsed = {};

		if ( uri === undefined ) {
			uri = !server ? location.href : "";
		}

		if ( !server ) {
			obj = document.createElement( "a" );
			obj.href = uri;
		}
		else {
			obj = url.parse( uri );
		}

		if ( server ) {
			utility.iterate( obj, function ( v, k ) {
				if ( v === null ) {
					obj[k] = undefined;
				}
			});
		}

		parsed = {
			auth     : server ? null : regex.auth.exec( uri ),
			protocol : obj.protocol || "http:",
			hostname : obj.hostname || "localhost",
			port     : obj.port ? number.parse( obj.port, 10 ) : "",
			pathname : obj.pathname,
			search   : obj.search   || "",
			hash     : obj.hash     || "",
			host     : obj.host     || "localhost"
		};

		// 'cause IE is ... IE; required for data.batch()
		if ( client.ie ) {
			if ( parsed.protocol === ":" ) {
				parsed.protocol = location.protocol;
			}

			if ( string.isEmpty( parsed.hostname ) ) {
				parsed.hostname = location.hostname;
			}

			if ( string.isEmpty( parsed.host ) ) {
				parsed.host = location.host;
			}

			if ( parsed.pathname.charAt( 0 ) !== "/" ) {
				parsed.pathname = "/" + parsed.pathname;
			}
		}

		parsed.auth  = obj.auth || ( parsed.auth === null ? "" : parsed.auth[1] );
		parsed.href  = obj.href || ( parsed.protocol + "//" + ( string.isEmpty( parsed.auth ) ? "" : parsed.auth + "@" ) + parsed.host + parsed.pathname + parsed.search + parsed.hash );
		parsed.path  = obj.path || parsed.pathname + parsed.search;
		parsed.query = utility.queryString( null, parsed.search );

		return parsed;
	}