write method
Writes a value to the cache.
Implementation
@override
Future<void> write(String key, T value, {Duration? ttl}) async {
await _cache.write(key, value);
if (ttl != null) {
await _cacheExpiryTimes.write(key, _now().add(ttl));
}
}
Writes a value to the cache.
@override
Future<void> write(String key, T value, {Duration? ttl}) async {
await _cache.write(key, value);
if (ttl != null) {
await _cacheExpiryTimes.write(key, _now().add(ttl));
}
}