Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
b3f83f12
Commit
b3f83f12
authored
Mar 19, 2010
by
Jeremy Zawodny
Browse files
support for include directive in config parser
parent
aa42c9a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
redis.c
View file @
b3f83f12
...
@@ -1701,6 +1701,8 @@ static void loadServerConfig(char *filename) {
...
@@ -1701,6 +1701,8 @@ static void loadServerConfig(char *filename) {
if (server.dbnum < 1) {
if (server.dbnum < 1) {
err = "Invalid number of databases"; goto loaderr;
err = "Invalid number of databases"; goto loaderr;
}
}
} else if (!strcasecmp(argv[0],"include") && argc == 2) {
loadServerConfig(argv[1]);
} else if (!strcasecmp(argv[0],"maxclients") && argc == 2) {
} else if (!strcasecmp(argv[0],"maxclients") && argc == 2) {
server.maxclients = atoi(argv[1]);
server.maxclients = atoi(argv[1]);
} else if (!strcasecmp(argv[0],"maxmemory") && argc == 2) {
} else if (!strcasecmp(argv[0],"maxmemory") && argc == 2) {
...
...
redis.conf
View file @
b3f83f12
...
@@ -278,3 +278,13 @@ shareobjectspoolsize 1024
...
@@ -278,3 +278,13 @@ shareobjectspoolsize 1024
# configuration directives.
# configuration directives.
hash
-
max
-
zipmap
-
entries
64
hash
-
max
-
zipmap
-
entries
64
hash
-
max
-
zipmap
-
value
512
hash
-
max
-
zipmap
-
value
512
################################## INCLUDES ###################################
# Include one or more other config files here. This is useful if you
# have a standard template that goes to all redis server but also need
# to customize a few per-server settings. Include files can include
# other files, so use this wisely.
#
# include /path/to/local.conf
# include /path/to/other.conf
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment