diff options
author | Arun Isaac <arunisaac@systemreboot.net> | 2022-12-29 20:23:59 +0000 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2022-12-31 19:01:39 +0100 |
commit | 2b47175b7f1712d4f78eac9fd6818f7ffe51dbfb (patch) | |
tree | e557f2ab4ec65d60a0d738796973e440645e35e4 | |
parent | 3dd75b9e9eb564f201efb895b2bdc1175bd27527 (diff) |
cache: Specify that cache! returns the cached value.
* mumi/cache.scm (cache!): Specify in the docstring that cache!
returns the cached value.
-rw-r--r-- | mumi/cache.scm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mumi/cache.scm b/mumi/cache.scm index 13b21f9..98a7856 100644 --- a/mumi/cache.scm +++ b/mumi/cache.scm @@ -1,5 +1,6 @@ ;;; mumi -- Mediocre, uh, mail interface ;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net> +;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net> ;;; ;;; This program is free software: you can redistribute it and/or ;;; modify it under the terms of the GNU Affero General Public License @@ -34,7 +35,7 @@ expired or return #F." (define* (cache! key value #:optional (ttl (%config 'cache-ttl))) "Store VALUE for the given KEY and mark it to expire after TTL -seconds." +seconds. Return VALUE." (let ((t (current-time))) (hash-set! %cache key `(#:expires ,(+ t ttl) #:value ,value)) value)) |