[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dict-tree 9e9d7e9 056/154: Added dictree-clear-caches f
From: |
Stefan Monnier |
Subject: |
[elpa] externals/dict-tree 9e9d7e9 056/154: Added dictree-clear-caches for doing the obvious |
Date: |
Mon, 14 Dec 2020 12:21:44 -0500 (EST) |
branch: externals/dict-tree
commit 9e9d7e9282bc2cc34f0a58812584d1f14e8aec92
Author: Toby Cubitt <toby-predictive@dr-qubit.org>
Commit: tsc25 <toby-predictive@dr-qubit.org>
Added dictree-clear-caches for doing the obvious
---
dict-tree.el | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/dict-tree.el b/dict-tree.el
index d6e0e57..17d686f 100644
--- a/dict-tree.el
+++ b/dict-tree.el
@@ -1322,6 +1322,23 @@ TEST returns non-nil."
;; deleted and not in cached result: requires no action
)))
+
+(defun dictree-clear-caches (dict)
+ "Clear all DICT's query caches."
+ (interactive (list (read-dict "Dictionary: ")))
+ (dolist (cachefun '(dictree-lookup-cache
+ dictree-complete-cache
+ dictree-complete-ranked-cache
+ dictree-wildcard-cache
+ dictree-wildcard-ranked-cache))
+ (when (funcall cachefun dict)
+ (clrhash (funcall cachefun dict))))
+ (when (interactive-p)
+ (message "Cleared caches for dictionary %s" (dictree-name dict))))
+
+
+
+
;; ----------------------------------------------------------------
;; Retrieving data
- [elpa] externals/dict-tree bc5724e 080/154: Minor bug-fixes to [trie/dict-tree]--edebug-pretty-print, (continued)
- [elpa] externals/dict-tree bc5724e 080/154: Minor bug-fixes to [trie/dict-tree]--edebug-pretty-print, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree f0396a0 087/154: Fixed bugs in synchronisation of regexp query caches., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 18ede82 089/154: Fixed minor spelling errors in docstrings., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree a9344ec 093/154: Updated Package-Version, Package-Requires, and Keywords package headers., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 4722fcb 100/154: Modified read-dict to return dictionary name instead of dictionary., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree d325841 009/154: Dictionaries are now saved in both compiled and uncompiled forms., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 753904c 034/154: Added functions for pushing things onto dictree and trie stacks, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree b3eb0f1 031/154: Bug-fix to dictree-insert, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 0774b51 048/154: Added support for wildcard searches, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 06f5039 055/154: Bug-fix to 'resultfun' feature in dictree--query and dictree--do-query, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 9e9d7e9 056/154: Added dictree-clear-caches for doing the obvious,
Stefan Monnier <=
- [elpa] externals/dict-tree 32bb6e2 061/154: Replaced wildcard searches with more powerful and efficient regexp searches., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree aa22866 062/154: minor fix: added tNFA to required packages, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree c53e4b8 064/154: Bumped copyright year, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 61f0ce6 068/154: Bug-fix in dictree--query, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 168cdb5 072/154: Improved edebug-prin1 advice, Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 8810d3e 076/154: Bug-fixes to edebug pretty-print functions., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree c1eeabe 081/154: Made dictionary auto-saving more robust against dictionary save failures., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 2666377 084/154: Fixed implementation of 'both cache policy., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 5cc5449 091/154: Fixed obsolete functions and other compiler warnings., Stefan Monnier, 2020/12/14
- [elpa] externals/dict-tree 0ea66e7 090/154: Added fboundp guard around ad-define-subr-args (removed in Emacs-24)., Stefan Monnier, 2020/12/14