From 89019c66a20482e6da7c9498b59017d5e7d21d5a Mon Sep 17 00:00:00 2001 From: Gerry Agbobada <10496163+gagbo@users.noreply.github.com> Date: Fri, 23 Oct 2020 14:40:10 +0200 Subject: [PATCH] Clarify doom-store-put docstring Explicitely states that a `nil` TTL means "no expiration" Make it clearer that TTL is an offset to current-time, and not a timestamp in seconds --- core/autoload/store.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/autoload/store.el b/core/autoload/store.el index 92ac05832..3d6b5ce81 100644 --- a/core/autoload/store.el +++ b/core/autoload/store.el @@ -108,9 +108,10 @@ If it doesn't exist or has expired, DEFAULT_VALUE is returned." ;;;###autoload (defun doom-store-put (key value &optional ttl location) "Set KEY to VALUE in the store at LOCATION. -KEY can be any lisp object that is comparable with `equal'. TTL is the time (in -seconds) until this cache entry expires. LOCATION is the super-key to store this -cache item under. It defaults to `doom-store-location'." +KEY can be any lisp object that is comparable with `equal'. TTL is the duration +(in seconds) after which this cache entry expires; if nil, no cache expiration. +LOCATION is the super-key to store this cache item under. It defaults to +`doom-store-location'." (doom--store-put key value (or location doom-store-location) ttl)) ;;;###autoload