github.com/micro/go-micro/v2@v2.9.1/registry/cache/options.go (about)

     1  package cache
     2  
     3  import (
     4  	"time"
     5  )
     6  
     7  // WithTTL sets the cache TTL
     8  func WithTTL(t time.Duration) Option {
     9  	return func(o *Options) {
    10  		o.TTL = t
    11  	}
    12  }