Allows you to set Cache-Control headers for each page or globally to allow clients and proxies to cache your page and to improve performance. If you're looking for page or fragment caching (where generated HTML is written to your local disk) see the docs on page caching.
To use, add
expires: 120 and
expires_type: private (for example) to your
config.yml to set global values and use the
metadata on each page for which you wish to set different values. For more
information about expire types, see the
Warning: setting very high values for
expires or the
might lead to unexpected consequences where users get outdated pages. Values
above 1 hour (
3600, in seconds) should be approached with extreme caution.
Written by Max Sadrieh.
$ cd path/to/site $ echo 'gem "nesta-plugin-cache" >> Gemfile' $ bundle
For full instructions, see the README. You can browse the code on the GitHub page.