writeJson<T> method

Future<void> writeJson<T>(
  1. String key,
  2. T value, {
  3. Duration? ttl,
  4. Duration? expiresIn,
})

Alias for set to store a JSON object.

Implementation

Future<void> writeJson<T>(String key, T value, {Duration? ttl, Duration? expiresIn}) =>
    set<T>(key, value, ttl: ttl, expiresIn: expiresIn);