CacheSv1.Clear API

This commit is contained in:
DanB
2018-03-08 20:28:34 +01:00
parent 94ee9cdea8
commit d4ae8e5b71
2 changed files with 13 additions and 0 deletions

View File

@@ -56,3 +56,9 @@ func (chSv1 *CacheSv1) RemoveItem(args *engine.ArgsGetCacheItem,
reply *string) error {
return chSv1.cacheS.V1RemoveItem(args, reply)
}
// Clear will clear partitions in the cache (all for nil, none for empty slice)
func (chSv1 *CacheSv1) Clear(cacheIDs []string,
reply *string) error {
return chSv1.cacheS.V1Clear(cacheIDs, reply)
}

View File

@@ -153,3 +153,10 @@ func (chS *CacheS) V1RemoveItem(args *ArgsGetCacheItem,
*reply = utils.OK
return
}
func (chS *CacheS) V1Clear(cacheIDs []string,
reply *string) (err error) {
Cache.Clear(cacheIDs)
*reply = utils.OK
return
}