function IpUtils::setCacheResult
2 calls to IpUtils::setCacheResult()
- IpUtils::checkIp4 in vendor/
symfony/ http-foundation/ IpUtils.php - Compares two IPv4 addresses. In case a subnet is given, it checks if it contains the request IP.
- IpUtils::checkIp6 in vendor/
symfony/ http-foundation/ IpUtils.php - Compares two IPv6 addresses. In case a subnet is given, it checks if it contains the request IP.
File
-
vendor/
symfony/ http-foundation/ IpUtils.php, line 254
Class
- IpUtils
- Http utility functions.
Namespace
Symfony\Component\HttpFoundationCode
private static function setCacheResult(string $cacheKey, bool $result) : bool {
if (1000 < \count(self::$checkedIps)) {
// stop memory leak if there are many keys
self::$checkedIps = \array_slice(self::$checkedIps, 500, null, true);
}
return self::$checkedIps[$cacheKey] = $result;
}