ttlcache支持泛型

This commit is contained in:
刘祥超
2023-10-05 08:28:16 +08:00
parent 8561ff3e2d
commit d92f27c44b
10 changed files with 95 additions and 89 deletions

View File

@@ -1,6 +1,6 @@
package ttlcache
type Item struct {
Value any
type Item[T any] struct {
Value T
expiredAt int64
}