Wire in Nginx's proxy cache directives.
Tested with Dokku-alt. Your milage may vary on vanilla Dokku.
$ cd /var/lib/dokku-alt
$ git clone https://github.com/rummik/dokku-nginx-cache.git
Enable nginx request caching
$ dokku nginx:cache:enable my-app
Disable nginx request caching
$ dokku nginx:cache:disable my-app
Currently there are no configuration options. However, Nginx does obey a
number of caching- and X-Accel-*
-related headers.
Snippet from the Nginx docs:
X-Accel-Expires
,Expires
,Cache-Control
,Set-Cookie
, andVary
set the parameters of response caching;X-Accel-Redirect
performs an internal redirect to the specified URI;X-Accel-Limit-Rate
sets the rate limit for transmission of a response to a client;X-Accel-Buffering
enables or disables buffering of a response;X-Accel-Charset
sets the desired charset of a response.