diff --git a/config/cachecfg_test.go b/config/cachecfg_test.go index 8c4af4f4c..4531dc5a0 100644 --- a/config/cachecfg_test.go +++ b/config/cachecfg_test.go @@ -61,7 +61,7 @@ func TestCacheCfgloadFromJsonCfg(t *testing.T) { t.Errorf("Expected: %+v ,recived: %+v", expected, cachecfg) } cfgJSONStr := `{ -"cache":{ +"caches":{ "*destinations": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, "*reverse_destinations": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, "*rating_plans": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, diff --git a/config/config_defaults.go b/config/config_defaults.go index a521c2034..ce0bc1378 100755 --- a/config/config_defaults.go +++ b/config/config_defaults.go @@ -152,7 +152,7 @@ const CGRATES_CFG_JSON = ` }, -"cache":{ +"caches":{ "*destinations": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // destination caching "*reverse_destinations": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // reverse destinations index caching "*rating_plans": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // rating plans caching diff --git a/config/config_json.go b/config/config_json.go index 7441ecdcd..5aa77bcbb 100644 --- a/config/config_json.go +++ b/config/config_json.go @@ -24,7 +24,7 @@ import ( const ( GENERAL_JSN = "general" - CACHE_JSN = "cache" + CACHE_JSN = "caches" LISTEN_JSN = "listen" HTTP_JSN = "http" DATADB_JSN = "data_db" diff --git a/data/conf/cgrates/cgrates.json b/data/conf/cgrates/cgrates.json index cb79e2eaa..989b129d7 100755 --- a/data/conf/cgrates/cgrates.json +++ b/data/conf/cgrates/cgrates.json @@ -131,7 +131,7 @@ // }, -// "cache":{ +// "caches":{ // "*destinations": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // destination caching // "*reverse_destinations": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // reverse destinations index caching // "*rating_plans": {"limit": -1, "ttl": "", "static_ttl": false, "precache": false}, // rating plans caching diff --git a/data/conf/samples/dispatchers/dispatchers/cgrates.json b/data/conf/samples/dispatchers/dispatchers/cgrates.json index 8de2caf22..79d7970ff 100755 --- a/data/conf/samples/dispatchers/dispatchers/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers/cgrates.json @@ -23,7 +23,7 @@ "db_type":"*internal", }, -"cache":{ +"caches":{ "*dispatcher_routes": {"limit": -1, "ttl": "2s"} }, diff --git a/data/conf/samples/dispatchers/dispatchers_gob/cgrates.json b/data/conf/samples/dispatchers/dispatchers_gob/cgrates.json index b8e1c7de1..0f679aa3a 100755 --- a/data/conf/samples/dispatchers/dispatchers_gob/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers_gob/cgrates.json @@ -23,7 +23,7 @@ "db_type":"*internal", }, -"cache":{ +"caches":{ "*dispatcher_routes": {"limit": -1, "ttl": "2s"} }, diff --git a/data/conf/samples/dispatchers/dispatchers_mongo/cgrates.json b/data/conf/samples/dispatchers/dispatchers_mongo/cgrates.json index 3410051cb..596286287 100644 --- a/data/conf/samples/dispatchers/dispatchers_mongo/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers_mongo/cgrates.json @@ -32,7 +32,7 @@ "db_port": 27017, }, -"cache":{ +"caches":{ "*dispatcher_routes": {"limit": -1, "ttl": "2s"} }, diff --git a/data/conf/samples/dispatchers/dispatchers_mongo_gob/cgrates.json b/data/conf/samples/dispatchers/dispatchers_mongo_gob/cgrates.json index 2a28cb711..9e3070d52 100644 --- a/data/conf/samples/dispatchers/dispatchers_mongo_gob/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers_mongo_gob/cgrates.json @@ -32,7 +32,7 @@ "db_port": 27017, }, -"cache":{ +"caches":{ "*dispatcher_routes": {"limit": -1, "ttl": "2s"} }, diff --git a/data/conf/samples/dispatchers/dispatchers_no_attributes/cgrates.json b/data/conf/samples/dispatchers/dispatchers_no_attributes/cgrates.json index 871d7a4a5..dbea5e3f0 100755 --- a/data/conf/samples/dispatchers/dispatchers_no_attributes/cgrates.json +++ b/data/conf/samples/dispatchers/dispatchers_no_attributes/cgrates.json @@ -23,7 +23,7 @@ "db_type":"*internal", }, -"cache":{ +"caches":{ "*dispatcher_routes": {"limit": -1, "ttl": "2s"} }, diff --git a/data/conf/samples/gocs/dsp_site/cgrates.json b/data/conf/samples/gocs/dsp_site/cgrates.json index 1a1e57b54..462deae9a 100644 --- a/data/conf/samples/gocs/dsp_site/cgrates.json +++ b/data/conf/samples/gocs/dsp_site/cgrates.json @@ -20,7 +20,7 @@ "db_name": "13" }, - "cache":{ + "caches":{ "*dispatcher_routes": {"limit": -1, "ttl": "2s"} }, diff --git a/data/conf/samples/mongoatlas/cgrates.json b/data/conf/samples/mongoatlas/cgrates.json index 8a9186111..cee81f51f 100755 --- a/data/conf/samples/mongoatlas/cgrates.json +++ b/data/conf/samples/mongoatlas/cgrates.json @@ -35,7 +35,7 @@ }, -"cache":{ +"caches":{ "*destinations": {"limit": 10000, "ttl":"0s", "precache": true}, "*reverse_destinations": {"limit": 10000, "ttl":"0s", "precache": true}, "*rating_plans": {"limit": 10000, "ttl":"0s","precache": true}, diff --git a/data/conf/samples/precache/tutmongo/cgrates.json b/data/conf/samples/precache/tutmongo/cgrates.json index 472a229c7..f60329883 100644 --- a/data/conf/samples/precache/tutmongo/cgrates.json +++ b/data/conf/samples/precache/tutmongo/cgrates.json @@ -29,7 +29,7 @@ }, -"cache":{ +"caches":{ "*destinations": {"limit": 10000, "ttl":"0s", "precache": true}, "*reverse_destinations": {"limit": 10000, "ttl":"0s", "precache": true}, "*rating_plans": {"limit": 10000, "ttl":"0s","precache": true}, diff --git a/data/conf/samples/precache/tutmysql/cgrates.json b/data/conf/samples/precache/tutmysql/cgrates.json index 734e6c231..18375b091 100644 --- a/data/conf/samples/precache/tutmysql/cgrates.json +++ b/data/conf/samples/precache/tutmysql/cgrates.json @@ -25,7 +25,7 @@ }, -"cache":{ +"caches":{ "*destinations": {"limit": 10000, "ttl":"0s", "precache": true}, "*reverse_destinations": {"limit": 10000, "ttl":"0s", "precache": true}, "*rating_plans": {"limit": 10000, "ttl":"0s","precache": true}, diff --git a/data/conf/samples/rpccaching/cgrates.json b/data/conf/samples/rpccaching/cgrates.json index 22fb2aacc..390f424e6 100644 --- a/data/conf/samples/rpccaching/cgrates.json +++ b/data/conf/samples/rpccaching/cgrates.json @@ -17,7 +17,7 @@ }, -"cache":{ +"caches":{ "*rpc_responses": {"limit": -1, "ttl": "1s"}, }, diff --git a/utils/consts.go b/utils/consts.go index bbba9507f..0bc844741 100755 --- a/utils/consts.go +++ b/utils/consts.go @@ -363,7 +363,6 @@ const ( NonTransactional = "" // used in transactional cache mechanism DataDB = "data_db" StorDB = "stor_db" - Cache = "cache" NotFoundCaps = "NOT_FOUND" ServerErrorCaps = "SERVER_ERROR" MandatoryIEMissingCaps = "MANDATORY_IE_MISSING"