On Sun, Aug 16, 2015 at 12:05 AM, <jaillet...@apache.org> wrote: > Author: jailletc36 > Date: Sat Aug 15 22:05:08 2015 > New Revision: 1696105 > > URL: http://svn.apache.org/r1696105 [] > Modified: httpd/httpd/trunk/modules/cache/mod_socache_memcache.c > URL: > http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_socache_memcache.c?rev=1696105&r1=1696104&r2=1696105&view=diff > ============================================================================== > --- httpd/httpd/trunk/modules/cache/mod_socache_memcache.c (original) > +++ httpd/httpd/trunk/modules/cache/mod_socache_memcache.c Sat Aug 15 > 22:05:08 2015 [] > @@ -310,6 +319,35 @@ static const ap_socache_provider_t socac [] > +static const char *socache_mc_set_ttl(cmd_parms *cmd, void *dummy, > + const char *arg) > +{ > + socache_mc_svr_cfg *sconf = > ap_get_module_config(cmd->server->module_config, > + > &socache_memcache_module); > + int i; > + > + i = atoi(arg); > + > + if ((i < 1) || (i > 1800)) {
Why a limit of 1800? Maybe the implicit INT_MAX is good enough. Also the memcached may never close its connections by itself, or always do, so -1 and 0 could also be interesting... > + return apr_pstrcat(cmd->pool, cmd->cmd->name, > + " must be a number between 1 and 1800.", NULL); > + } > + > + /* apr_memcache_server_create needs a ttl in usec. */ > + sconf->ttl = i * 1000 * 1000; sconf->ttl = apr_time_from_sec(i) ? > + > + return NULL; > +} Regards, Yann.