Skip to content

Commit 67f06ad

Browse files
committed
Document selective cache flushing.
1 parent 47f69ac commit 67f06ad

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

web-server-doc/web-server/scribblings/cache-table.scrbl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ functions.
2222
called to construct the value and add it to @racket[ct].
2323
}
2424

25-
@defproc[(cache-table-clear! [ct cache-table?])
25+
@defproc[(cache-table-clear! [ct cache-table?]
26+
[entry-ids (or/c false/c (listof symbol?)) #f])
2627
void?]{
27-
Clears all entries in @racket[ct].
28+
If @racket[entry-ids] is @racket[#f] (the default), clears all entries in
29+
@racket[ct]. Otherwise, clears only the entries with keys in @racket[entry-ids].
2830
}
2931

3032
@defproc[(cache-table? [v any/c])

web-server-doc/web-server/scribblings/dispatch-servlets.scrbl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,13 @@
1818
@defproc[(make-cached-url->servlet
1919
[url->path url->path/c]
2020
[path->serlvet path->servlet/c])
21-
(values (-> void)
21+
(values (->* () ((or/c false/c (listof url?))) void?)
2222
url->servlet/c)]{
23-
The first return value flushes the cache. The second is a procedure
24-
that uses @racket[url->path] to resolve the URL to a path, then uses
23+
The first return value flushes the cache. If its option argument is
24+
@racket[#f] (the default), all cached servlets are flushed. Otherwise,
25+
it flushes only those servlet caches to which @racket[url->path] maps
26+
the given URLs. The second return value is a procedure that uses
27+
@racket[url->path] to resolve the URL to a path, then uses
2528
@racket[path->servlet] to resolve that path to a servlet, caching the
2629
results in an internal table.
2730
}

0 commit comments

Comments
 (0)