Case cache
option in POST requests
#7
Comments
I think |
I don't think it does, but I also think it's unnecessary, and having POST requests aren't meant to be cached under normal circumstances, and browsers won't cache it, so there's no need for cache-busting. Same applies for all simulated verbs which are using POST behind the scenes with more or less similar semantic in terms of cache-ability. |
Ok, then I'm agree with your changes. Just one thing, at line 248, your line should be : if(cache === null){ cache = method=='POST'; } Otherwise if |
You're rigth. But let's make that:
|
Actually. Hm. No, leave it as it is in my original pull. EDIT: Just tested in most of the browsers I have + NodeJS. Using double-equals with |
Yep, I just saw on MDN that |
Here's a console session to prove it works:
|
FYI, CoffeeScript and similar languages almost universally use the |
Interesting! Fine, let's do that PR ^^ |
Fixes #7: Caching only disabled in GET requests
And thanks a lot for your help ;) |
Just scratching my own itch. :) |
It seems apache does not support POST requests caching. Then, |
Is there any use case for
cache
option in POST requests? If not, then I suggest the default value ofcache
option to depend on method name, where it would befalse
by default on GET requests, andtrue
for POST. I'll do a PR so you can see what I mean.The text was updated successfully, but these errors were encountered: