The KOS model instance
The API path constant
The HTTP method (defaults to 'get')
true if a valid cached response exists
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();
}
Check if a cached response exists for the given path and method