CacheSv1.RemoveGroup API

This commit is contained in:
DanB
2018-03-09 19:33:33 +01:00
parent 63dbd3e714
commit e5ea978f6f
3 changed files with 14 additions and 1 deletions

View File

@@ -86,3 +86,9 @@ func (chSv1 *CacheSv1) GetGroupItemIDs(args *engine.ArgsGetGroup,
rply *[]string) (err error) {
return chSv1.cacheS.V1GetGroupItemIDs(args, rply)
}
// RemoveGroup will remove a group and all items belonging to it from cache
func (chSv1 *CacheSv1) RemoveGroup(args *engine.ArgsGetGroup,
rply *string) (err error) {
return chSv1.cacheS.V1RemoveGroup(args, rply)
}

View File

@@ -210,3 +210,10 @@ func (chS *CacheS) V1GetGroupItemIDs(args *ArgsGetGroup,
*rply = Cache.GetGroupItemIDs(args.CacheID, args.GroupID)
return
}
func (chS *CacheS) V1RemoveGroup(args *ArgsGetGroup,
rply *string) (err error) {
Cache.RemoveGroup(args.CacheID, args.GroupID, true, utils.NonTransactional)
*rply = utils.OK
return
}

2
glide.lock generated
View File

@@ -16,7 +16,7 @@ imports:
- name: github.com/cgrates/kamevapi
version: e4dfe7d6cb5bb0872111fe7d61af0e1a19eda485
- name: github.com/cgrates/ltcache
version: 1d85e3af2ba5aa25e665b767f4a9ad59055a314d
version: 72c7e248f205d81666842bf108384eec8d18f425
- name: github.com/cgrates/osipsdagram
version: 3d6beed663452471dec3ca194137a30d379d9e8f
- name: github.com/cgrates/radigo