A server provides Web responses that can include content from data tables
in a database. The server maintains a cache (e.g., in system memory) that
can store content (including content from data tables) so as to increase
the efficiency of subsequently providing the same content to satisfy
client Web requests. The server monitors data tables for changes and,
when a change in a particular data table occurs, invalidates cached
entries that depend on a particular data table. Further, in response to a
client Web request for a Web response, the server assigns a database
cache dependency to at least a portion of a constructed Web response
(e.g., to content retrieved from a data table) based on commands executed
during construction of the Web response. The at least a portion of the
constructed Web response is subsequently cached in a cache location at
the server.