add Size() fn

This commit is contained in:
Alex Grintsvayg 2020-11-03 15:35:11 -05:00
parent 1189f7f993
commit 818c60532e
No known key found for this signature in database
GPG key ID: AEB3F089F86A22B5

View file

@ -59,6 +59,10 @@ func (c *Cache) ItemCount() int {
return count return count
} }
func (c *Cache) Size() int64 {
return c.size
}
func (c *Cache) DeletePrefix(prefix string) int { func (c *Cache) DeletePrefix(prefix string) int {
count := 0 count := 0
for _, b := range c.buckets { for _, b := range c.buckets {