Expirable entries
erwanor opened this issue · comments
Erwan Or commented
Hi,
Do you plan to add, in the near future, support for expirable entries?
e.g:
expiration := time.Now().Add(24 * time.Hour) // Now + 24h
gc := gcache.New(10).LRU().Build()
gc.Set("key", "value", expiration)
If you don't, would you be interested in a PR that extends the current implementation to support that feature?
Jun Kimura commented
Hi, @aaronwinter
Yes, I'm interested in it.
But if include the suggested features, I would like to separate from the Set method.
For example, how about implementing it in the SetWithExpire method?