HTTP has methods that are safe or unsafe, and methods that are idempotent or not idempotet. See the HTTP spec:
Methods can also have the property of "idempotence" in that (aside from error or expiration issues) the side-effects of N > 0 identical requests is the same as for a single request. The methods GET, HEAD, PUT and DELETE share this property.
You can GET
, PUT
, or DELETE
a Resources as often as you like, the result will be the same, no matter how often you do it.
As you see, POST
is not idempotet. It makes a difference to POST
a request to a Resource once, twice, or more often. That's because the semantics of POST
is to create something below the Resource you POST
to.
Because of all this, it makes no sense to cache the result of a POST
request.