get Device Hardware By Model
suspend fun getDeviceHardwareByModel(hwModel: Int, forceRefresh: Boolean = false): Result<DeviceHardware?>
Retrieves device hardware information by its model ID.
This function implements a cache-aside pattern with a fallback mechanism:
Check for a valid, non-expired local cache entry.
If not found or expired, fetch fresh data from the remote API.
If the remote fetch fails, attempt to use stale data from the cache.
If the cache is empty, fall back to loading data from a bundled JSON asset.
Return
A Result containing the DeviceHardware on success (or null if not found), or an exception on failure.
Parameters
hw Model
The hardware model identifier.
force Refresh
If true, the local cache will be invalidated and data will be fetched remotely.