3 ms·
Then there is a PERIOD, and it says "Responses to this method are not cacheable." So caching DELETE is against the spec.
by zcvosdfdgj 14y ago
Then there is a PERIOD, and it says "Responses to this method are not cacheable."
So caching DELETE is against the spec.
- nagisa 14y agoBut returning already cached GET response to DELETE request is not. I, however, agree that this behaviour shouldn't happen.
- jerf 14y agoI believe the spec is saying that if you are a proxy, and you have a cached value for X, then you see a delete for X, you are allowed to immediately expire your entry for X. In other words, the proxy is permitted to assume that a delete request is so likely to result in a change on that resource that it may simply assume the cache is bad. It isn't required to, though. It does not mean that if you receive a DELETE request you can just substitute the value of what is a completely different request (the GET request). I believe eloisius is not correct about the spec banning this behavior with that line. It's "banned" because it's just broken, nonsensical. It's not the same request in the first place, any more than you can just substitute POST results for GET.
- zcvosdfdgj 14y agoBut returning already cached GET response to DELETE request is not. Yes, you're right.. the spec doesn't mention what should happen when the developer does something completely irrational, like returning a cached GET response to a DELETE request.
- dingle_thunk 14y agoYes, but mailing a bicycle to a random US address as a response to the DELETE request is also not explicitly forbidden in the spec. This doesn't mean that the spec provides for commercial suicide through bicycle mail.