MCPcopy Create free account
hub / github.com/F-Stack/f-stack / replicationScriptCacheFlush

Function replicationScriptCacheFlush

app/redis-6.2.6/src/replication.c:3097–3101  ·  view source on GitHub ↗

Empty the script cache. Should be called every time we are no longer sure * that every slave knows about all the scripts in our set, or when the * current AOF "context" is no longer aware of the script. In general we * should flush the cache: * * 1) Every time a new slave reconnects to this master and performs a * full SYNC (PSYNC does not require flushing). * 2) Every time an AOF rewrit

Source from the content-addressed store, hash-verified

3095 * to reclaim otherwise unused memory.
3096 */
3097void replicationScriptCacheFlush(void) {
3098 dictEmpty(server.repl_scriptcache_dict,NULL);
3099 listRelease(server.repl_scriptcache_fifo);
3100 server.repl_scriptcache_fifo = listCreate();
3101}
3102
3103/* Add an entry into the script cache, if we reach max number of entries the
3104 * oldest is removed from the list. */

Callers 4

scriptCommandFunction · 0.85
replicationCronFunction · 0.85

Calls 3

dictEmptyFunction · 0.85
listReleaseFunction · 0.85
listCreateFunction · 0.85

Tested by

no test coverage detected