chore: limit lru cache size

This commit is contained in:
loveuer 2024-07-25 17:37:07 +08:00
parent 53f124c9ec
commit d55c6b1932

View File

@ -103,7 +103,7 @@ func (l *_lru) Del(ctx context.Context, keys ...string) error {
}
func newLRUCache() (interfaces.Cacher, error) {
client := expirable.NewLRU[string, *_lru_value](0, nil, 0)
client := expirable.NewLRU[string, *_lru_value](1024*1024, nil, 0)
return &_lru{client: client}, nil
}