@@ -33,7 +33,6 @@ Nottingham's `Cache Tutorial`_.
3333.. index ::
3434 single: Cache; Proxy
3535 single: Cache; Reverse proxy
36- single: Cache; Gateway
3736
3837.. _gateway-caches :
3938
@@ -286,10 +285,14 @@ Safe Methods: Only caching GET or HEAD requests
286285HTTP caching only works for "safe" HTTP methods (like GET and HEAD). This means
287286two things:
288287
289- * Don't try to cache PUT, POST or DELETE requests. It won't work and with good
290- reason. These methods are meant to be used when mutating the state of your application
288+ * Don't try to cache PUT or DELETE requests. It won't work and with good reason.
289+ These methods are meant to be used when mutating the state of your application
291290 (e.g. deleting a blog post). Caching them would prevent certain requests from hitting
292- and mutating your application. (Technically caching POST requests is possible however this is very narrow case `Caching POST `_
291+ and mutating your application.
292+
293+ * POST requests are generally considered uncachable, but `they can be cached `_
294+ when they include explicit freshness information. However POST caching is not
295+ widely implemented, so you should avoid it if possible.
293296
294297* You should *never * change the state of your application (e.g. update a blog post)
295298 when responding to a GET or HEAD request. If those requests are cached, future
@@ -366,4 +369,4 @@ Learn more
366369.. _`RFC 7234 - Caching` : https://tools.ietf.org/html/rfc7234
367370.. _`RFC 7232 - Conditional Requests` : https://tools.ietf.org/html/rfc7232
368371.. _`FOSHttpCacheBundle` : http://foshttpcachebundle.readthedocs.org/
369- .. _`Caching POST ` : https://www.mnot.net/blog/2012/09/24/caching_POST
372+ .. _`they can be cached ` : https://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-20#section-2.3.4
0 commit comments