allegro / allegro/bigcache

Reset() don't work

Đang mở
#322 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Go
Star
8.2k
Fork
614
Merge trung bình
5 ngày 12 giờ
Pull request đã merge (30 ngày)
1

Mô tả

**What is the issue you are having?**
Reset shards no longer works

**What is BigCache doing that it shouldn't?**
Empty the shards.

Using stats method i can see the how many items are in cache
```
cache, initErr := bigcache.NewBigCache(config)
cache.Stats()

Output: {"hits":1222,"misses":2,"delete_hits":0,"delete_misses":0,"collisions":0}
```
but when i run the method Reset to flush the shards, they are not flushed / empty, , in previously versions this method works correctly.

```
cache, initErr := bigcache.NewBigCache(config)
cache.Reset()
```
After i run the Reset() the stats are se same
`Output: {"hits":1222,"misses":2,"delete_hits":0,"delete_misses":0,"collisions":0}`

**Environment:**
- Version (git sha or release): v3@v3.0.2
- OS (e.g. from `/etc/os-release` or winver.exe): Debian GNU/Linux 10 (buster)
- go version: 1.18.3

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.