关于 GPG 被提及gpg-agent
并且我读到以下答案:
哪里提到了--default-cache-ttl
和--max-cache-ttl
选项?所以我找到了这个官方来源:
--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).
因此,请考虑以下主要问题:
--default-cache-ttl
和选项之间有什么区别和联系--max-cache-ttl
?
次要问题如下:
- 到底是什么
cache entry
? gpg-agent
当考虑/应用--default-cache-ttl
和选项时要知道的标准是什么--max-cache-ttl
?
因此,我想清楚地了解何时以及为何根据每个选项考虑 600 秒(10 分钟)和 7200 秒(2 小时)的要点/场景/标准