Setting max-cache-ttl to 0 does not disable caching

NIIBE Yutaka gniibe at fsij.org
Fri May 9 04:48:08 CEST 2025


Hello, again,

Thanks for your further testing.

"Lucas Mulling" <lucas.mulling at suse.com> wrote:
> Can confirm that this works.

OK.

I wrote:
> Possible fix to recover the same semantics would be the following.

Sorry, it's not mature.

> ==========================
> -  if (maxttl)
> +  if (no_maxttl)
> +    next = 0;
> +  else
>      {
>        if (r->created + maxttl < current)

This should have been <=.


And... I modified the implementation, so that it will be easier to
maintain.


Attached a updated patch with documentation update.

The behavior/semantics of gpg-agent with 'max-cache-ttl 0' is a bit
difficult (for me).  It currently means that it pushes an entry which
will be immediately expired.  Thus, I am going to update the
documentation for default-cache-ttl==0.

-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-agent-Recover-the-old-behavior-with-max-cache-ttl-0.patch
Type: text/x-diff
Size: 3736 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-devel/attachments/20250509/b806f997/attachment.patch>


More information about the Gnupg-devel mailing list