private function removeExpired($key): bool
    {
        if (
            \array_key_exists($key, self::$expired) === false
            ||
            \array_key_exists($key, self::$values) === false
        ) {
            return false;
        }

        list($time, $ttl) = self::$expired[$key];

        if (\time() > ($time + $ttl)) {
            unset(self::$values[$key]);
        }

        if (!isset(self::$values[$key])) {
            unset(self::$expired[$key]);
        }

        return true;
    }
private function removeExpired($key): bool
    {
        if (
            \array_key_exists($key, self::$expired) === false
            ||
            \array_key_exists($key, self::$values) === false
        ) {
            return false;
        }

        list($time, $ttl) = self::$expired[$key];

        if (\time() > ($time + $ttl)) {
            unset(self::$values[$key]);
        }

        if (!isset(self::$values[$key])) {
            unset(self::$expired[$key]);
        }

        return true;
    }
private function removeExpired ( $ key ) : bool { if ( \ array_key_exists ( $ key , self :: $ expired ) === false || \ array_key_exists ( $ key , self :: $ values ) === false ) { return false ; } list ( $ time , $ ttl ) = self :: $ expired [ $ key ] ; if ( \ time ( ) > ( $ time + $ ttl ) ) { unset ( self :: $ values [ $ key ] ) ; } if ( ! isset ( self :: $ values [ $ key ] ) ) { unset ( self :: $ expired [ $ key ] ) ; } return true ; }
Remove expired cache.

@param string $key

@return bool
Remove expired cache .