diff --git a/src/redis.c b/src/redis.c index fdd30d14..21298e6e 100644 --- a/src/redis.c +++ b/src/redis.c @@ -1517,6 +1517,7 @@ void initServer() { } if (server.cluster_enabled) clusterInit(); + replicationScriptCacheInit(); scriptingInit(); slowlogInit(); bioInit(); diff --git a/src/scripting.c b/src/scripting.c index f30956bd..ff94ae16 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -655,10 +655,6 @@ void scriptingInit(void) { * to global variables. */ scriptingEnableGlobalsProtection(lua); - /* Initialize the Replication Script Cache for EVALSHA propagation to - * slaves and AOF. */ - replicationScriptCacheInit(); - server.lua = lua; }