The cache directive adds http caching
basic example
This is the most basic usage. It will cache successful responses and save them in a temp folder. It will respect cache-control headers if present. If no expiration is specified it will use a default of 5 minutes.
advanced usage
You can specify more advanced options such as: - match_path: It will cache given path unless a header specifies otherwise (cache-control: private) - match_header: It will cache responses with given header. In the example: every response with Content-Type image/jpg OR image/png will be cached unless a header specifies otherwise - status_header: Is the header name to set with the cache status. The value will be one of the following: hit, miss, skip or bypass - default_max_age: It specifies the default expiration for cached responses when headers do not specify it. - path: where to store the responses. Make sure it exists and it is writable by caddy process.
Related Links
Documentation
Access the full documentation for this plugin off-site:
Plugin Help
Plugin Website
Visit http.cache’s website for more information:
Plugin Author: Nicolas
Last Updated: 27 Jul 2017, 11:23 PM