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
This commit is contained in:
Gerry Agbobada 2020-10-23 14:40:10 +02:00 committed by GitHub
parent adff1aa68d
commit 89019c66a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -108,9 +108,10 @@ If it doesn't exist or has expired, DEFAULT_VALUE is returned."
;;;###autoload ;;;###autoload
(defun doom-store-put (key value &optional ttl location) (defun doom-store-put (key value &optional ttl location)
"Set KEY to VALUE in the store at 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 KEY can be any lisp object that is comparable with `equal'. TTL is the duration
seconds) until this cache entry expires. LOCATION is the super-key to store this (in seconds) after which this cache entry expires; if nil, no cache expiration.
cache item under. It defaults to `doom-store-location'." 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)) (doom--store-put key value (or location doom-store-location) ttl))
;;;###autoload ;;;###autoload