On this page:
make-cache-table
cache-table-lookup!
cache-table-clear!
cache-table?

5.4 Cache Table

This module provides a set of caching hash table functions.

Constructs a cache-table.

procedure

(cache-table-lookup! ct id mk)  any/c

  ct : cache-table?
  id : symbol?
  mk : (-> any/c)
Looks up id in ct. If it is not present, then mk is called to construct the value and add it to ct.

procedure

(cache-table-clear! ct [entry-ids])  void?

  ct : cache-table?
  entry-ids : (or/c false/c (listof symbol?)) = #f
If entry-ids is #f, clears all entries in ct. Otherwise, clears only the entries with keys in entry-ids.

Changed in version 6.9.0.1 of package web-server-lib: Added optional argument.

procedure

(cache-table? v)  boolean?

  v : any/c
Determines if v is a cache table.