Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. IpUtils.php

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\HttpFoundation

Code

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal