getCacheData abstract method

Future<APICacheDBModel?> getCacheData(
  1. String url, {
  2. Duration? maxAge,
})

Retrieves cached data corresponding to the provided URL asynchronously. Parameters: url: The URL for which cached data is requested. maxAge: optional freshness window. If the cached entry is older than maxAge, it is treated as a miss — the stale entry is cleared and null is returned instead of stale data. Omit to return cached data regardless of age (previous behaviour). Returns: A future that completes with the cached data associated with the URL, if available. If no cached data is found for the URL, returns null.

Implementation

Future<APICacheDBModel?> getCacheData(String url, {Duration? maxAge});