diff --git a/modules/cachedb_local/cachedb_local.c b/modules/cachedb_local/cachedb_local.c index 55554dd9ce0..88eb3b36da2 100644 --- a/modules/cachedb_local/cachedb_local.c +++ b/modules/cachedb_local/cachedb_local.c @@ -308,7 +308,6 @@ lcache_con* lcache_new_connection(struct cachedb_id* id) } con->col = it; - it->is_used = 1; return con; } @@ -494,10 +493,6 @@ static int mod_init(void) default_col->col_name.len = sizeof(DEFAULT_COLLECTION_NAME) - 1; default_col->size = (1 << HASH_SIZE_DEFAULT); - /* the default collection is special; it's always there, it doesn't have - * to be used in order to keep backwards compatibility */ - default_col->is_used = 1; - /* link the default collection */ default_col->next = lcache_collection; lcache_collection = default_col; @@ -538,13 +533,6 @@ static int mod_init(void) clean_rpm_cache_old(); for ( col_it=lcache_collection; col_it; col_it=col_it->next ) { - /* check to see if we've got unused collections */ - if ( !col_it->is_used ) { - LM_WARN("collection <%.*s> is not assigned to any url!\n", - col_it->col_name.len, col_it->col_name.s); - continue; - } - if (!cluster_id && col_it->replicated) { LM_WARN("collection <%.*s> is replicated but no " "'cluster_id' defined!\n", diff --git a/modules/cachedb_local/cachedb_local.h b/modules/cachedb_local/cachedb_local.h index 8fdc4df6933..a9888d73c10 100644 --- a/modules/cachedb_local/cachedb_local.h +++ b/modules/cachedb_local/cachedb_local.h @@ -58,10 +58,6 @@ typedef struct lcache_col { lcache_htable_t *col_htable; int size; - /* we need to know somehow if this collection is used or not; - * if not used we'll need to throw an error */ - int is_used; - int replicated; osips_malloc_f malloc; diff --git a/modules/cachedb_local/doc/cachedb_local_admin.xml b/modules/cachedb_local/doc/cachedb_local_admin.xml index e364644a12b..1275e61ee31 100644 --- a/modules/cachedb_local/doc/cachedb_local_admin.xml +++ b/modules/cachedb_local/doc/cachedb_local_admin.xml @@ -95,8 +95,11 @@
<varname>cachedb_url</varname> (string) - URL parameter used to define cachedb_local collections. One collection - can belong to multiple URLs, but one URL can have only one collection. + URLs of local cache groups to be used used for the script and MI cacheDB + operations. The parameter can be set multiple times. + + + One collection can belong to multiple URLs, but one URL can have only one collection. Redefining an URL with the same schema and group name will result in overwriting that URL. Each collection used in URL definition must be defined using cachedb_collection parameter. The collection shall be defined @@ -138,8 +141,7 @@ cache_store("local:group2", ...) Using this parameter collections(hash tables) and their sizes can be defined. Each collection definition must be separated one from another using ';'. Default size for a hash is 512. The size must be separated from the name of the collection using - '='. Every collection that is defined in this parameter SHOULD be - used in at least one URL, else you'll receive a WARNING. + '='. If clustering is enabled you have to specify which collections you want to replicate