X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/1609a1c42d8f49bada5375a8756a2ca56609ece8..ad01a25553ed32b33efe036bb10450852f91478f:/src/redis.c diff --git a/src/redis.c b/src/redis.c index 36b7c853..bb917f50 100644 --- a/src/redis.c +++ b/src/redis.c @@ -596,7 +596,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) { } updateDictResizePolicy(); } - } else { + } else if (!server.ds_enabled) { /* If there is not a background saving in progress check if * we have to save now */ time_t now = time(NULL); @@ -769,7 +769,7 @@ void initServerConfig() { server.maxmemory_policy = REDIS_MAXMEMORY_VOLATILE_LRU; server.maxmemory_samples = 3; server.ds_enabled = 0; - server.ds_path = zstrdup("/tmp/redis.ds"); + server.ds_path = sdsnew("/tmp/redis.ds"); server.cache_max_memory = 64LL*1024*1024; /* 64 MB of RAM */ server.cache_blocked_clients = 0; server.hash_max_zipmap_entries = REDIS_HASH_MAX_ZIPMAP_ENTRIES;