Cache.set
void set(string key, T value) @safeStores a value in the cache with the default TTL.
Parameters
key | Cache key |
value | Value to cache |
void set(string key, T value, Duration ttl) @safeStores a value in the cache with a custom TTL.
Parameters
key | Cache key |
value | Value to cache |
ttl | Time-to-live for this entry |