diff --git a/engine/storage_map.go b/engine/storage_map.go index 22cb58c55..ab5f08ec6 100644 --- a/engine/storage_map.go +++ b/engine/storage_map.go @@ -563,11 +563,14 @@ func (ms *MapStorage) GetActions(key string, skipCache bool, transactionID strin cCommit := cacheCommit(transactionID) key = utils.ACTION_PREFIX + key if !skipCache { - if x, ok := cache.Get(key); ok { - if x != nil { - return x.(Actions), nil + if x, err := cache.GetCloned(key); err != nil { + if err.Error() != utils.ItemNotFound { + return nil, err } + } else if x == nil { return nil, utils.ErrNotFound + } else { + return x.(Actions), nil } } if values, ok := ms.dict[key]; ok { diff --git a/engine/storage_mongo_datadb.go b/engine/storage_mongo_datadb.go index 5a12b102c..a861a727c 100644 --- a/engine/storage_mongo_datadb.go +++ b/engine/storage_mongo_datadb.go @@ -896,11 +896,14 @@ func (ms *MongoStorage) UpdateReverseDestination(oldDest, newDest *Destination, func (ms *MongoStorage) GetActions(key string, skipCache bool, transactionID string) (as Actions, err error) { if !skipCache { - if x, ok := cache.Get(utils.ACTION_PREFIX + key); ok { - if x != nil { - return x.(Actions), nil + if x, err := cache.GetCloned(utils.ACTION_PREFIX + key); err != nil { + if err.Error() != utils.ItemNotFound { + return nil, err } + } else if x == nil { return nil, utils.ErrNotFound + } else { + return x.(Actions), nil } } var result struct { diff --git a/engine/storage_redis.go b/engine/storage_redis.go index 525b1497f..d3c5367eb 100644 --- a/engine/storage_redis.go +++ b/engine/storage_redis.go @@ -572,11 +572,14 @@ func (rs *RedisStorage) UpdateReverseDestination(oldDest, newDest *Destination, func (rs *RedisStorage) GetActions(key string, skipCache bool, transactionID string) (as Actions, err error) { key = utils.ACTION_PREFIX + key if !skipCache { - if x, ok := cache.Get(key); ok { - if x != nil { - return x.(Actions), nil + if x, err := cache.GetCloned(key); err != nil { + if err.Error() != utils.ItemNotFound { + return nil, err } + } else if x == nil { return nil, utils.ErrNotFound + } else { + return x.(Actions), nil } } var values []byte