put<T> method
Stores a value in the cache.
Implementation
Future<void> put<T>(String key, T value, {int? seconds}) async {
DateTime? expiration;
if (seconds != null) {
expiration = NyTime.now().add(Duration(seconds: seconds));
}
_store[key] = _CacheEntry(value: value, expiration: expiration);
}