cache: storage_args renamed to storage_options

This commit is contained in:
Johan Wikman 2016-09-20 11:09:21 +03:00
parent e484aac6f0
commit ac43580ce8
3 changed files with 8 additions and 8 deletions

View File

@ -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`

View File

@ -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)
{

View File

@ -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.