About GPG is mentioned the gpg-agent
and I read the following answer:
Where is mentioned the --default-cache-ttl
and --max-cache-ttl
options. So I found this official source:
--default-cache-ttl n
Set the time a cache entry is valid to n seconds. The default is 600 seconds.
Each time a cache entry is accessed, the entry's timer is reset.
To set an entry's maximum lifetime, use max-cache-ttl
Note that a cached passphrase may not be evicted immediately from memory if
no client requests a cache operation. This is due to an internal housekeeping
function which is only run every few seconds.
--max-cache-ttl n
Set the maximum time a cache entry is valid to n seconds.
After this time a cache entry will be expired even if it
has been accessed recently or has been set using gpg-preset-passphrase.
The default is 2 hours (7200 seconds).
Therefore consider the main question as follows:
- What is the difference and relation between the
--default-cache-ttl
and--max-cache-ttl
options?
And as secondary questions the following:
- What is exactly the
cache entry
? - What is the criteria of the
gpg-agent
to know when consider/apply the--default-cache-ttl
and--max-cache-ttl
options?
Therefore I want clearly understand the points/scenarios/criteria about when and why was considered the 600 seconds (10 minutes) and 7200 seconds (2hrs) according with each option