aboutsummaryrefslogtreecommitdiff
path: root/lib/state.lisp
diff options
context:
space:
mode:
authorColin Okay <okay@toyful.space>2022-03-13 17:40:45 -0500
committerColin Okay <okay@toyful.space>2022-03-13 17:40:45 -0500
commit57bae08a8b9accc1d4bfb7165080e7d5a5ef2a30 (patch)
treead737e3a5d2d61817fcd89ea0cf7a972202f98c5 /lib/state.lisp
parent7a97e9d6ba5737f1088dd3a81b9b16121cf47c39 (diff)
deletion support; some cache syncing in client functions;
Diffstat (limited to 'lib/state.lisp')
-rw-r--r--lib/state.lisp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/state.lisp b/lib/state.lisp
index 9c25ab6..7a9a427 100644
--- a/lib/state.lisp
+++ b/lib/state.lisp
@@ -78,6 +78,10 @@
(string #'oneliner-name))
:test #'equal))
+(defun remove-from-cache (id-or-name)
+ "Removes an item from the contents of *cache*."
+ (a:when-let (found (get-cached id-or-name))
+ (setf *cache* (delete found *cache*))))
;;; DRAFTS VAR AND OPERATIONS