cache action plans

fixes #279, fixes #281
This commit is contained in:
Radu Ioan Fericean
2015-11-08 16:26:57 +02:00
parent 204acb886c
commit 5ebfa319fc
9 changed files with 160 additions and 64 deletions

View File

@@ -118,6 +118,7 @@ func (s *Scheduler) LoadActionPlans(storage engine.RatingStorage) {
if toBeSaved {
engine.Guardian.Guard(func() (interface{}, error) {
storage.SetActionPlans(key, newApls)
storage.CacheRatingPrefixValues(map[string][]string{utils.ACTION_PLAN_PREFIX: []string{key}})
return 0, nil
}, 0, utils.ACTION_PLAN_PREFIX)
}