! Copyright (C) 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: assocs kernel namespaces memoize init sequences vocabs
-vocabs.hierarchy vocabs.loader vocabs.metadata vocabs.refresh ;
+vocabs.hierarchy vocabs.loader vocabs.metadata vocabs.refresh
+words ;
IN: vocabs.cache
: reset-cache ( vocab -- )
- vocab-name root-cache get-global delete-at
- \ vocab-file-contents reset-memoized
+ vocab-name
+ [ root-cache get-global delete-at ]
+ [
+ \ vocab-file-contents "memoize" word-prop
+ [ drop [ first vocab-name ] [ = not ] bi* ] with assoc-filter! drop
+ ] bi
\ all-vocabs-recursive reset-memoized
\ all-authors reset-memoized
\ all-tags reset-memoized ;