(key string, value T)
| 21 | } |
| 22 | |
| 23 | func (c *KeyedCache[T]) Set(key string, value T) { |
| 24 | c.SetWithExpirable(key, value, ExpirationTime(time.Now().Add(c.ttl))) |
| 25 | } |
| 26 | |
| 27 | func (c *KeyedCache[T]) SetWithTTL(key string, value T, ttl time.Duration) { |
| 28 | c.SetWithExpirable(key, value, ExpirationTime(time.Now().Add(ttl))) |