mirror of
https://github.com/fluencelabs/redis
synced 2025-06-22 13:31:32 +00:00
Replication of scripts as EVALSHA: sha1 caching implemented.
This code is only responsible to take an LRU-evicted fixed length cache of SHA1 that we are sure all the slaves received. In this commit only the implementation is provided, but the Redis core does not use it to actually send EVALSHA to slaves when possible.
This commit is contained in:
12
src/redis.c
12
src/redis.c
@ -561,6 +561,18 @@ dictType keylistDictType = {
|
||||
dictListDestructor /* val destructor */
|
||||
};
|
||||
|
||||
/* Replication cached script dict (server.repl_scriptcache_dict).
|
||||
* Keys are sds SHA1 strings, while values are not used at all in the current
|
||||
* implementation. */
|
||||
dictType replScriptCacheDictType = {
|
||||
dictSdsHash, /* hash function */
|
||||
NULL, /* key dup */
|
||||
NULL, /* val dup */
|
||||
dictSdsKeyCompare, /* key compare */
|
||||
dictSdsDestructor, /* key destructor */
|
||||
NULL /* val destructor */
|
||||
};
|
||||
|
||||
int htNeedsResize(dict *dict) {
|
||||
long long size, used;
|
||||
|
||||
|
Reference in New Issue
Block a user