优化ttlcache相关代码

This commit is contained in:
刘祥超
2024-05-08 11:10:56 +08:00
parent 5020985b96
commit f1b3a7463d
15 changed files with 77 additions and 44 deletions

View File

@@ -0,0 +1,20 @@
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}
}