Merge pull request #122 from pricees/master
Added Items() to return items from BeeCache
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() | ... | ... |
-
Please register or sign in to post a comment