adjust the code that initializes the cache to be more defensive

This commit is contained in:
Robby Findler 2015-04-25 07:09:03 -05:00
parent 3ea5bd2e31
commit b3719378fc

View File

@ -80,9 +80,10 @@
(define (populate-cache! cache)
(define cache-content (blueboxes-cache-info-or-paths cache))
(when ((listof path?) cache-content)
(set-blueboxes-cache-info-or-paths! cache (build-blueboxes-cache cache-content))
(define mtd-table (compute-methods-table (blueboxes-cache-info-or-paths cache)))
(set-blueboxes-cache-method->tags! cache mtd-table)))
(define the-cache (build-blueboxes-cache cache-content))
(define mtd-table (compute-methods-table the-cache))
(set-blueboxes-cache-method->tags! cache mtd-table)
(set-blueboxes-cache-info-or-paths! cache the-cache)))
(define (compute-methods-table lst)
(define meth-ht (make-hash))