Skip to main content

Module cache

Module cache 

Source
Expand description

The response cache: JSON reads kept by ETag, so a repeated one is answered from a 304.

Structs§

CachedResponse
A response the cache holds for a URL: the validator HEY sent with it, and the body it validates.
FileCache
Keeps cached responses on disk, the same layout the Go SDK uses: etags.json maps keys to validators and responses/<key>.body holds the bodies. Anything that goes wrong on disk is treated as a miss.
InMemoryCache
Keeps cached responses for the life of the process.

Traits§

ResponseCache
Stores JSON responses by ETag so a repeated read can be answered from a 304.

Functions§

cache_key
The key a URL is cached under. The credentials are folded in so one person’s cached reads are never answered to another.