cron part of disk store object cache implemented. Objects are pushed as IO jobs if needed, so that the IO thread will process them.

This commit is contained in:
antirez
2010-12-29 22:18:20 +01:00
parent cea8c5cd75
commit f63f0928c3
3 changed files with 65 additions and 5 deletions

View File

@ -620,11 +620,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
/* Remove a few cached objects from memory if we are over the
* configured memory limit */
while (server.ds_enabled && zmalloc_used_memory() >
server.cache_max_memory)
{
if (cacheFreeOneEntry() == REDIS_ERR) break;
}
if (server.ds_enabled) cacheCron();
/* Replication cron function -- used to reconnect to master and
* to detect transfer failures. */