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