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

Breadcrumb

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

function Cache::set

Retrieves a single entry from the cache.

Parameters

string $key The key of the data to set. If NULL,: sets the entire cache.

mixed $value The value to set.:

Return value

void

2 calls to Cache::set()
LocalFile::process in vendor/squizlabs/php_codesniffer/src/Files/LocalFile.php
Processes the file.
Runner::processChildProcs in vendor/squizlabs/php_codesniffer/src/Runner.php
Waits for child processes to complete and cleans up after them.

File

vendor/squizlabs/php_codesniffer/src/Util/Cache.php, line 332

Class

Cache

Namespace

PHP_CodeSniffer\Util

Code

public static function set($key, $value) {
    if ($key === null) {
        self::$cache = $value;
    }
    else {
        self::$cache[$key] = $value;
    }
}

API Navigation

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