mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 23:40:56 +00:00
Merge pull request #122 from pricees/master
Added Items() to return items from BeeCache
This commit is contained in:
commit
6f2cd326bf
5
cache.go
5
cache.go
@ -73,6 +73,11 @@ func (bc *BeeCache) Delete(name string) (ok bool, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Return all of the item in a BeeCache
|
||||||
|
func (bc *BeeCache) Items() map[string]*BeeItem {
|
||||||
|
return bc.items
|
||||||
|
}
|
||||||
|
|
||||||
func (bc *BeeCache) IsExist(name string) bool {
|
func (bc *BeeCache) IsExist(name string) bool {
|
||||||
bc.lock.RLock()
|
bc.lock.RLock()
|
||||||
defer bc.lock.RUnlock()
|
defer bc.lock.RUnlock()
|
||||||
|
Loading…
Reference in New Issue
Block a user