mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* gpg-agent.c: New option --max-cache-ttl. Suggested by Alexander
Belopolsky. * cache.c (housekeeping): Use it here instead of the hardwired default of 1 hour.
This commit is contained in:
parent
0ded031237
commit
ebaba6bdab
4 changed files with 16 additions and 4 deletions
|
@ -103,10 +103,11 @@ housekeeping (void)
|
|||
that the user has to enter it from time to time. We do this every hour */
|
||||
for (r=thecache; r; r = r->next)
|
||||
{
|
||||
if (!r->lockcount && r->pw && r->created + 60*60 < current)
|
||||
if (!r->lockcount && r->pw && r->created + opt.max_cache_ttl < current)
|
||||
{
|
||||
if (DBG_CACHE)
|
||||
log_debug (" expired `%s' (1h after creation)\n", r->key);
|
||||
log_debug (" expired `%s' (%lus after creation)\n",
|
||||
r->key, opt.max_cache_ttl);
|
||||
release_data (r->pw);
|
||||
r->pw = NULL;
|
||||
r->accessed = current;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue