mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-21 07:08:45 +05:00
cache refactoring for save and load
This commit is contained in:
@@ -26,7 +26,6 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/cache2go"
|
||||
"github.com/cgrates/cgrates/config"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
@@ -274,11 +273,10 @@ func (es LCREntriesSorter) Sort() {
|
||||
func (lcra *LCRActivation) GetLCREntryForPrefix(destination string) *LCREntry {
|
||||
var potentials LCREntriesSorter
|
||||
for _, p := range utils.SplitPrefix(destination, MIN_PREFIX_MATCH) {
|
||||
if x, err := cache2go.Get(utils.DESTINATION_PREFIX + p); err == nil {
|
||||
if x, err := CacheGet(utils.DESTINATION_PREFIX + p); err == nil {
|
||||
|
||||
destIds := x.(map[interface{}]struct{})
|
||||
for idId := range destIds {
|
||||
dId := idId.(string)
|
||||
destIds := x.(map[string]struct{})
|
||||
for dId := range destIds {
|
||||
for _, entry := range lcra.Entries {
|
||||
if entry.DestinationId == dId {
|
||||
entry.precision = len(p)
|
||||
|
||||
Reference in New Issue
Block a user