+ } else if (!strcasecmp(argv[0],"maxmemory-policy") && argc == 2) {
+ if (!strcasecmp(argv[1],"volatile-lru")) {
+ server.maxmemory_policy = REDIS_MAXMEMORY_VOLATILE_LRU;
+ } else if (!strcasecmp(argv[1],"volatile-random")) {
+ server.maxmemory_policy = REDIS_MAXMEMORY_VOLATILE_RANDOM;
+ } else if (!strcasecmp(argv[1],"volatile-ttl")) {
+ server.maxmemory_policy = REDIS_MAXMEMORY_VOLATILE_TTL;
+ } else if (!strcasecmp(argv[1],"allkeys-lru")) {
+ server.maxmemory_policy = REDIS_MAXMEMORY_ALLKEYS_LRU;
+ } else if (!strcasecmp(argv[1],"allkeys-random")) {
+ server.maxmemory_policy = REDIS_MAXMEMORY_ALLKEYS_RANDOM;
+ } else if (!strcasecmp(argv[1],"noeviction")) {
+ server.maxmemory_policy = REDIS_MAXMEMORY_NO_EVICTION;
+ } else {
+ err = "Invalid maxmemory policy";
+ goto loaderr;
+ }
+ } else if (!strcasecmp(argv[0],"maxmemory-samples") && argc == 2) {
+ server.maxmemory_samples = atoi(argv[1]);
+ if (server.maxmemory_samples <= 0) {
+ err = "maxmemory-samples must be 1 or greater";
+ goto loaderr;
+ }