Index: cache.rkt ================================================================== --- cache.rkt +++ cache.rkt @@ -19,11 +19,11 @@ (schema-out cache:index-entry) (schema-out listing) delete-article! delete-notes! delete-index-entries! - save-index-entries! + save-cache-things! articles articles+notes listing-htmls fenced-listing unfence) @@ -107,11 +107,11 @@ (query-exec (cache-conn) (~> (from cache:index-entry #:as e) (where (= e.page ,(format "~a" page))) delete))) -(define (save-index-entries! es) +(define (save-cache-things! es) (void (apply insert! (cache-conn) es))) ;; ;; ~~~ Fetching articles and notes ~~~ ;; Index: code-docs/cache.scrbl ================================================================== --- code-docs/cache.scrbl +++ code-docs/cache.scrbl @@ -138,11 +138,18 @@ Use this in templates with strings returned from @racket[->html] when called on docs that use the @racket[fenced-listing] tag function. } -@section{Deleting records} +@section{Modifying the cache} + +@defproc[(save-cache-things! + [things (listof (or/c cache:article? cache:note? cache:index-entry?))]) void?]{ + +Saves all the @racket[_thing]s to the cache database. + +} @deftogether[(@defproc[(delete-article! [page stringish?]) void?] @defproc[(delete-notes! [page stringish?]) void?])]{ Delete a particular article, or all notes for a particular article, respectively. Index: crystalize.rkt ================================================================== --- crystalize.rkt +++ crystalize.rkt @@ -260,7 +260,7 @@ (define all-entries (append (for/list ([etx (in-list entry-txs)]) (txexpr->index-entry etx pagenode)) (current-metas-keyword-entries pagenode))) (delete-index-entries! pagenode) - (save-index-entries! all-entries)) + (save-cache-things! all-entries))