import requests


def get_cached(SERVER_URL, max_number=5):
    """
        It asks for the server for X amount of data cached on the server.
    :param SERVER_URL: string
        A string that contains the server address.
    :param max_number: int
        The amount of information the user desire from cached data.
    :return: json
        It returns a JSON containing the last X amount of data.
    """
    return requests.get(f'{SERVER_URL}/weather?max={max_number}').json()