store<T> method

Future store<T>(
  1. String key,
  2. T value,
  3. Storage storage
)

Implementation

Future store<T>(String key, T value, Storage storage) async {
  final cacheWrapper = write<T>(value);
  return await storage.write(key, jsonEncode(cacheWrapper.toMap()));
}