See ChangeLog

Monotone-Parent: ca33a6519e1f5687f227522d966c50c3f6cd6b10
Monotone-Revision: a9979a68cce7a82e5b6ee0e52a65df546ab56c59

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2010-02-23T14:49:18
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Ludovic Marcotte
2010-02-23 14:49:18 +00:00
parent 108954122c
commit 0f4868c996
6 changed files with 16 additions and 6 deletions
+4 -6
View File
@@ -105,26 +105,24 @@ static memcached_st *handle = NULL;
handle = memcached_create(NULL);
if (handle)
{
#warning We could also make the port number configurable and even make use \
of NGNetUtilities for that.
sd = [SOGoSystemDefaults sharedSystemDefaults];
// We define the default value for cleaning up cached users'
// preferences. This value should be relatively high to avoid
// useless database calls.
cleanupInterval = [sd cacheCleanupInterval];
memcachedServerPort = [sd memcachedPort];
ASSIGN (memcachedServerName, [sd memcachedHost]);
[self logWithFormat: @"Cache cleanup interval set every %f seconds",
cleanupInterval];
[self logWithFormat: @"Using host '%@' as server",
memcachedServerName];
[self logWithFormat: @"Using host '%@':%i as server",
memcachedServerName, memcachedServerPort];
if (!servers)
servers
= memcached_server_list_append(NULL,
[memcachedServerName UTF8String],
11211, &error);
memcachedServerPort, &error);
error = memcached_server_push(handle, servers);
}
}