Documentation
¶
Overview ¶
Package reqmemo memoizes point reads for the length of one read request.
A list page builds each item with the same helpers, and several of them read the same row (a viewer's track rules, a server setting, a title's resume record) once per item, or several times per item. The app attaches a memo to every GET and HEAD request; a helper that reads through Do asks the database once per key per request. Without a memo (a background job, a write request) Do just loads.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Do ¶
Do returns the memoized value for key, or loads, remembers and returns it. A failed load is not remembered. Callers must not change a returned value that other callers share (copy slices and maps before changing them).
func ForgetPrefix ¶
ForgetPrefix drops every key starting with prefix.
Types ¶
This section is empty.