mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Implement Resource in Cache and delete comments
This commit is contained in:
@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
package v1
|
||||
|
||||
/*
|
||||
import (
|
||||
"net/rpc"
|
||||
"net/rpc/jsonrpc"
|
||||
@@ -361,3 +362,4 @@ func testV1RsStopEngine(t *testing.T) {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -60,9 +60,9 @@ var sTestsOnStorIT = []func(t *testing.T){
|
||||
testOnStorITCacheLCR,
|
||||
testOnStorITCacheAlias,
|
||||
testOnStorITCacheReverseAlias,
|
||||
testOnStorITCacheResource,
|
||||
testOnStorITCacheResourceCfg,
|
||||
testOnStorITCacheTiming,
|
||||
testOnStorITCacheResource,
|
||||
// ToDo: test cache flush for a prefix
|
||||
// ToDo: testOnStorITLoadAccountingCache
|
||||
testOnStorITHasData,
|
||||
@@ -84,9 +84,9 @@ var sTestsOnStorIT = []func(t *testing.T){
|
||||
testOnStorITCRUDUser,
|
||||
testOnStorITCRUDAlias,
|
||||
testOnStorITCRUDReverseAlias,
|
||||
testOnStorITCRUDResource,
|
||||
testOnStorITCRUDResourceCfg,
|
||||
testOnStorITCRUDTiming,
|
||||
testOnStorITCRUDResource,
|
||||
testOnStorITCRUDHistory,
|
||||
testOnStorITCRUDStructVersion,
|
||||
testOnStorITCRUDSQStoredMetrics,
|
||||
@@ -851,7 +851,6 @@ func testOnStorITCacheTiming(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
//test here Cache
|
||||
func testOnStorITCacheResource(t *testing.T) {
|
||||
res := &Resource{
|
||||
ID: "RL1",
|
||||
@@ -1892,7 +1891,6 @@ func testOnStorITCRUDHistory(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
//test here Crud
|
||||
func testOnStorITCRUDResource(t *testing.T) {
|
||||
res := &Resource{
|
||||
ID: "RL1",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments
|
||||
Copyright (C) ITsysCOM GmbH
|
||||
|
||||
@@ -1903,8 +1903,6 @@ func (ms *MongoStorage) RemoveResourceCfg(id string, transactionID string) (err
|
||||
return nil
|
||||
}
|
||||
|
||||
//from here
|
||||
//find the right collumn
|
||||
func (ms *MongoStorage) GetResource(id string, skipCache bool, transactionID string) (r *Resource, err error) {
|
||||
key := utils.ResourcesPrefix + id
|
||||
if !skipCache {
|
||||
@@ -1946,8 +1944,6 @@ func (ms *MongoStorage) RemoveResource(id string, transactionID string) (err err
|
||||
return nil
|
||||
}
|
||||
|
||||
//to here
|
||||
|
||||
func (ms *MongoStorage) GetTiming(id string, skipCache bool, transactionID string) (t *utils.TPTiming, err error) {
|
||||
key := utils.TimingsPrefix + id
|
||||
if !skipCache {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments
|
||||
Copyright (C) ITsysCOM GmbH
|
||||
|
||||
@@ -1425,7 +1425,6 @@ func (rs *RedisStorage) RemoveResourceCfg(id string, transactionID string) (err
|
||||
return
|
||||
}
|
||||
|
||||
//from here
|
||||
func (rs *RedisStorage) GetResource(id string, skipCache bool, transactionID string) (r *Resource, err error) {
|
||||
key := utils.ResourcesPrefix + id
|
||||
if !skipCache {
|
||||
@@ -1468,8 +1467,6 @@ func (rs *RedisStorage) RemoveResource(id string, transactionID string) (err err
|
||||
return
|
||||
}
|
||||
|
||||
// to here
|
||||
|
||||
func (rs *RedisStorage) GetTiming(id string, skipCache bool, transactionID string) (t *utils.TPTiming, err error) {
|
||||
key := utils.TimingsPrefix + id
|
||||
if !skipCache {
|
||||
|
||||
Reference in New Issue
Block a user