The cache TTL can be set in ~/.gnupg/gpg-agent.conf
:
default-cache-ttl 34560000
max-cache-ttl 34560000
The values are in seconds. This sets both TTLs to 400 days (just over a year)
⚠️ Take caution on setting a TTL that is too long if you are in a shared system or are in an area where you suspect someone might snoop on your computer.
I personally use values of 6hrs and 1 Day for both of these respectively.
Related:
Tags:
#literature-note #security