Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e89aab0

Browse filesBrowse files
Reworded the explanation abut POST caching
1 parent 44e569f commit e89aab0
Copy full SHA for e89aab0

File tree

Expand file treeCollapse file tree

1 file changed

+8
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-5
lines changed

‎http_cache.rst

Copy file name to clipboardExpand all lines: http_cache.rst
+8-5Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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
286285
HTTP caching only works for "safe" HTTP methods (like GET and HEAD). This means
287286
two 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

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.