put<T> method
Stores object under key.
If ttl is provided, the entry expires after that duration. Providers
that support expiration (e.g. memory, Redis) honor this; providers that
don't may ignore it. A null ttl means "never expire".
Implementation
@override
void put<T>(String key, T object, {Duration? ttl}) {
final effectiveTtl = ttl ?? _ttlPolicy.ttlFor(key);
_storage[key] = _Entry(object, effectiveTtl);
}