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

Breadcrumb

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

function Cache::gcIsNecessary

Return value

bool

File

vendor/composer/composer/src/Composer/Cache.php, line 237

Class

Cache
Reads/writes to a filesystem cache

Namespace

Composer

Code

public function gcIsNecessary() {
    if (self::$cacheCollected) {
        return false;
    }
    self::$cacheCollected = true;
    if (Platform::getEnv('COMPOSER_TEST_SUITE')) {
        return false;
    }
    if (Platform::isInputCompletionProcess()) {
        return false;
    }
    return !random_int(0, 50);
}

API Navigation

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