Caching content in Go
The storage and retrieval of cached pages can be implemented by hand using your local filesystem, or a database to hold the data and the cached information. There are also open source tools available to help simplify this technique. One such project is httpcache by GitHub user gregjones.
The httpcache follows the caching requirements set by the Internet Engineering Task Force (IETF), the governing body for internet standards. The library provides a module that can store and retrieve web pages from your local machine, as well as a plugin for the Go HTTP client to automatically handle all cache-related HTTP request and response headers. It also provides multiple storage backends where you can store the cached information, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access