@@ -84,14 +84,14 @@ [author string/f] [published string/f] [updated string/f] [html string/f])) -(define (init-cache-db!) - (create-table! (cache-conn) 'cache:article) - (create-table! (cache-conn) 'cache:note) - (create-table! (cache-conn) 'cache:index-entry)) +(define (init-cache-db! #:reset? [reset? #f]) + (for ([table (in-list '(cache:article cache:note cache:index-entry))]) + (when reset? (drop-table! (cache-conn) table)) + (create-table! (cache-conn) table))) (define (delete-article! page) (query-exec (cache-conn) (~> (from cache:article #:as a) (where (= a.page ,(format "~a" page)))