micro/registry/cache/options.go

13 lines
148 B
Go
Raw Normal View History

2019-05-31 00:22:43 +01:00
package cache
import (
"time"
)
// WithTTL sets the cache TTL
func WithTTL(t time.Duration) Option {
return func(o *Options) {
o.TTL = t
}
}