mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 12:20:28 +08:00
21 lines
317 B
Go
21 lines
317 B
Go
|
|
package ttlcache
|
||
|
|
|
||
|
|
type OptionInterface interface {
|
||
|
|
}
|
||
|
|
|
||
|
|
type PiecesOption struct {
|
||
|
|
Count int
|
||
|
|
}
|
||
|
|
|
||
|
|
func NewPiecesOption(count int) *PiecesOption {
|
||
|
|
return &PiecesOption{Count: count}
|
||
|
|
}
|
||
|
|
|
||
|
|
type MaxItemsOption struct {
|
||
|
|
Count int
|
||
|
|
}
|
||
|
|
|
||
|
|
func NewMaxItemsOption(count int) *MaxItemsOption {
|
||
|
|
return &MaxItemsOption{Count: count}
|
||
|
|
}
|