vocabs.cache: clear only the vocab that changed from vocab-file-contents.
parent
33c4e19ff9
commit
9ac33a06bc
|
@ -1,12 +1,17 @@
|
||||||
! Copyright (C) 2009 Slava Pestov.
|
! Copyright (C) 2009 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: assocs kernel namespaces memoize init sequences vocabs
|
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
|
IN: vocabs.cache
|
||||||
|
|
||||||
: reset-cache ( vocab -- )
|
: reset-cache ( vocab -- )
|
||||||
vocab-name root-cache get-global delete-at
|
vocab-name
|
||||||
\ vocab-file-contents reset-memoized
|
[ 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-vocabs-recursive reset-memoized
|
||||||
\ all-authors reset-memoized
|
\ all-authors reset-memoized
|
||||||
\ all-tags reset-memoized ;
|
\ all-tags reset-memoized ;
|
||||||
|
|
Loading…
Reference in New Issue