put method
Stores an item in the cache for a given duration.
Implementation
@override
Future<void> put(String key, dynamic value, {Duration? ttl}) async {
final expiresAt = ttl != null ? DateTime.now().add(ttl) : null;
_storage[key] = _CacheEntry(value, expiresAt);
}