46

I use Postman extension to check out my RESTful APIs

I am trying to make a request to my "localhost", but it seems to have cached one of the query parameters.

I tried clearing cache of my chrome browser but this does not seem to work. I went to the extent of even changing the API resource name.

Has anyone come across such an issue?

Rahul Ahuja
  • 705
  • 1
  • 9
  • 16

5 Answers5

10

Cache-Control request header can be used but one thing to clarify

no-cache does not mean do not cache. In fact, it means on every HTTP request it "revalidate with server" before using any cached response. If the server says that the resource is still valid then the cache will still use the cached version.

while no-store is effectively asking to not cache at all and is intended not to to store anything in the cache.

Muhammad Soliman
  • 21,644
  • 6
  • 109
  • 75
1

I tried the solution above and it didn't work for me. What worked was restart the application. I'm using eclipse and running a spring boot application.

In case someone is using the same environment and facing the same problem it may help.

linoz
  • 19
  • 4
0

I suggest to use Postman App rather than the extension because with postman app you can do lot more cool things like you can use the console to debug your APIs, create/delete cookies and cache with excellent GUI.

Sai Ram Reddy
  • 1,079
  • 13
  • 14
0

I came across same situation where the request are cached in Postman. I deleted JSESSIONID cookie from Cookies section on PM rather closing the PM app, it solved my problem (means - the call reached to my localhost app) and got accurate response. Please try it if someone needs this solution.

-2

I usually just request the data on a chrome incognito tab/firefox private tab and I guess that this just resets the cache and then it appears on my Postman app.

(I would recommend using the Postman app instead of the website as it has many more features!)