mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-18 08:26:38 +02:00
13 lines
148 B
Go
13 lines
148 B
Go
|
package cache
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
// WithTTL sets the cache TTL
|
||
|
func WithTTL(t time.Duration) Option {
|
||
|
return func(o *Options) {
|
||
|
o.TTL = t
|
||
|
}
|
||
|
}
|