diff options
| author | 2010-06-27 21:12:28 +0200 | |
|---|---|---|
| committer | 2010-06-27 21:13:18 +0200 | |
| commit | 2b29da0c2ea26907c964bef179337a2cc614a22c (patch) | |
| tree | 7b1d0929621577aefb00a573e11431a9bf1e93bd /src | |
| parent | 622abdd12b5c31c2d506d710456bebd6bfff8603 (diff) | |
Check the cache DB every 15 minutes instead of checking on every write.
Diffstat (limited to 'src')
| -rw-r--r-- | src/gnutls_cache.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gnutls_cache.c b/src/gnutls_cache.c index 4d4a661..4d0a733 100644 --- a/src/gnutls_cache.c +++ b/src/gnutls_cache.c | |||
| @@ -309,8 +309,14 @@ static int dbm_cache_expire(mgs_handle_t *ctxt) | |||
| 309 | int keyidx = 0; | 309 | int keyidx = 0; |
| 310 | int should_delete = 0; | 310 | int should_delete = 0; |
| 311 | 311 | ||
| 312 | apr_pool_create(&spool, ctxt->c->pool); | ||
| 313 | ex = apr_time_now(); | 312 | ex = apr_time_now(); |
| 313 | |||
| 314 | if (ex - ctxt->sc->last_cache_check < 900) | ||
| 315 | return 0; | ||
| 316 | |||
| 317 | ctxt->sc->last_cache_check = ex; | ||
| 318 | |||
| 319 | apr_pool_create(&spool, ctxt->c->pool); | ||
| 314 | 320 | ||
| 315 | rv = apr_dbm_open(&dbm, ctxt->sc->cache_config, APR_DBM_READONLY, | 321 | rv = apr_dbm_open(&dbm, ctxt->sc->cache_config, APR_DBM_READONLY, |
| 316 | SSL_DBM_FILE_MODE, spool); | 322 | SSL_DBM_FILE_MODE, spool); |
