Empty the script cache. Should be called every time we are no longer sure * that every replica 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 replica reconnects to this master and performs a * full SYNC (PSYNC does not require flushing). * 2) Every time an AOF re
| 4562 | * to reclaim otherwise unused memory. |
| 4563 | */ |
| 4564 | void replicationScriptCacheFlush(void) { |
| 4565 | dictEmpty(g_pserver->repl_scriptcache_dict,NULL); |
| 4566 | listRelease(g_pserver->repl_scriptcache_fifo); |
| 4567 | g_pserver->repl_scriptcache_fifo = listCreate(); |
| 4568 | } |
| 4569 | |
| 4570 | /* Add an entry into the script cache, if we reach max number of entries the |
| 4571 | * oldest is removed from the list. */ |
no test coverage detected