src/Utility/Inflector.php
protected static function cache($type, $key, $value = false)
    {
        $key = '_' . $key;
        $type = '_' . $type;
        if ($value !== false) {
            static::$cache[$type][$key] = $value;

            return $value;
        }
        if (!isset(static::$cache[$type][$key])) {
            return false;
        }

        return static::$cache[$type][$key];
    }
protected static function cache($type, $key, $value = false)
    {
        $key = '_' . $key;
        $type = '_' . $type;
        if ($value !== false) {
            static::$cache[$type][$key] = $value;

            return $value;
        }
        if (!isset(static::$cache[$type][$key])) {
            return false;
        }

        return static::$cache[$type][$key];
    }
Cache inflected values, and return if already available.

@param string $type Inflection type.
@param string $key Original value.
@param string|bool $value Inflected value.

@return string|bool Inflected value on cache hit or false on cache miss.