• Check if a cached response exists for the given path and method

    Parameters

    • model: IKosDataModel

      The KOS model instance

    • path: string

      The API path constant

    • method: HttpMethod = "get"

      The HTTP method (defaults to 'get')

    Returns boolean

    true if a valid cached response exists

    Example

    if (hasCachedResponse(this, PATH_DEVICE_STATUS, 'get')) {
    // Use cached data
    const status = getServiceResponse(this, PATH_DEVICE_STATUS, 'get');
    } else {
    // Fetch fresh data
    await this.refreshStatus();
    }