339346e3 by Edward Price

Added Items() to return items from BeeCache

1 parent 4ffe988c
Showing 1 changed file with 5 additions and 0 deletions
...@@ -73,6 +73,11 @@ func (bc *BeeCache) Delete(name string) (ok bool, err error) { ...@@ -73,6 +73,11 @@ func (bc *BeeCache) Delete(name string) (ok bool, err error) {
73 return 73 return
74 } 74 }
75 75
76 // Return all of the item in a BeeCache
77 func (bc *BeeCache) Items() map[string]*BeeItem {
78 return bc.items
79 }
80
76 func (bc *BeeCache) IsExist(name string) bool { 81 func (bc *BeeCache) IsExist(name string) bool {
77 bc.lock.RLock() 82 bc.lock.RLock()
78 defer bc.lock.RUnlock() 83 defer bc.lock.RUnlock()
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!