You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
329 B
Go
22 lines
329 B
Go
package cache
|
|
|
|
import (
|
|
"time"
|
|
|
|
"zero/core/stores/internal"
|
|
)
|
|
|
|
type Option = internal.Option
|
|
|
|
func WithExpiry(expiry time.Duration) Option {
|
|
return func(o *internal.Options) {
|
|
o.Expiry = expiry
|
|
}
|
|
}
|
|
|
|
func WithNotFoundExpiry(expiry time.Duration) Option {
|
|
return func(o *internal.Options) {
|
|
o.NotFoundExpiry = expiry
|
|
}
|
|
}
|