initial import
This commit is contained in:
21
core/stores/cache/cacheopt.go
vendored
Normal file
21
core/stores/cache/cacheopt.go
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user