set method

Future set(
  1. Response response
)

Implementation

Future set(Response response) async {
  final cacheKey = _generateCacheKey(response.requestOptions);

  final cacheModel = CacheModel(
    expirationDateTime:
        DateTime.now().add(cacheOptions.cacheLifetimeDuration),
    value: response.data,
  );

  await _storage.set(cacheKey, cacheModel.toMap());
}