From ac43580ce8996dd42294cebfe670f8baf80df5f7 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Tue, 20 Sep 2016 11:09:21 +0300 Subject: [PATCH] cache: storage_args renamed to storage_options --- Documentation/Filters/Cache.md | 8 ++++---- server/modules/filter/cache/cache.c | 6 +++--- server/modules/filter/cache/cache_storage_api.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Documentation/Filters/Cache.md b/Documentation/Filters/Cache.md index bdd5fa555..889932dcb 100644 --- a/Documentation/Filters/Cache.md +++ b/Documentation/Filters/Cache.md @@ -15,7 +15,7 @@ type=filter module=cache ttl=5 storage=... -storage_args=... +storage_options=... [Cached Routing Service] type=service @@ -42,19 +42,19 @@ optional ones. #### `storage` The name of the module that provides the storage for the cache. That -module will be loaded and provided with the value of `storage_args` as +module will be loaded and provided with the value of `storage_options` as argument. For instance: ``` storage=storage_rocksdb ``` -#### `storage_args` +#### `storage_options` A comma separated list of arguments to be provided to the storage module, specified in `storage`, when it is loaded. Note that the needed arguments depend upon the specific module. For instance, ``` -storage_args=path=/usr/maxscale/cache/rocksdb +storage_options=storage_specific_option1=value1,storage_specific_option2=value2 ``` #### `allowed_references` diff --git a/server/modules/filter/cache/cache.c b/server/modules/filter/cache/cache.c index 4fc9b17ec..ba28389f3 100644 --- a/server/modules/filter/cache/cache.c +++ b/server/modules/filter/cache/cache.c @@ -94,7 +94,7 @@ typedef struct cache_config uint32_t max_resultset_rows; uint32_t max_resultset_size; const char *storage; - const char *storage_args; + const char *storage_options; uint32_t ttl; } CACHE_CONFIG; @@ -238,9 +238,9 @@ static FILTER *createInstance(const char *name, char **options, FILTER_PARAMETER error = true; } } - else if (strcmp(param->name, "storage_args") == 0) + else if (strcmp(param->name, "storage_options") == 0) { - config.storage_args = param->value; + config.storage_options = param->value; } else if (strcmp(param->name, "storage") == 0) { diff --git a/server/modules/filter/cache/cache_storage_api.h b/server/modules/filter/cache/cache_storage_api.h index f6c1b6618..53ff358d8 100644 --- a/server/modules/filter/cache/cache_storage_api.h +++ b/server/modules/filter/cache/cache_storage_api.h @@ -53,7 +53,7 @@ typedef struct cache_storage_api * @param name The name of the cache instance. * @param ttl Time to live; number of seconds the value is valid. * @param argc The number of elements in the argv array. - * @param argv Array of arguments, as passed in the `storage_args` parameter + * @param argv Array of arguments, as passed in the `storage_options` parameter * in the cache section in the MaxScale configuration file. * @return A new cache instance, or NULL if the instance could not be * created.