springintellij-ideaopenapiredocly

Do IntelliJ or Redocly cache HTTP results?


I am developing Java code using openapi 3.0.0, IntelliJ 2023.2.4 Ultimate and the Redocly plugin. I believe that HTTP responses are being cached at some layer of this stack, which is causing problems for me during code development.

I am generating code from a YAML specification, say myspec.yaml, which contains the title "My Title". Let's say at one point the API operations (called in IntelliJ via the Redocly plugin) all returned "404-not-found" and this was appropriate at the time, because I had bugs. Later, I found and fixed the bugs, but I kept getting the same 404 errors. I started troubleshooting by replacing the content of myspec.yaml with the well-known example petstore.yml. This worked fine, as expected. Then I replaced the title of myspec.yml with "My Title", while keeping everything else identical to petstore.yml To be very clear: myspec.yaml and petstore.yml are now identical, except the title is "My Title", which is what it was when I was getting the 404 errors. Rebuild the code, execute in Redocly: the operations all return 404 errors. Replace the spec title with a new title containing a unique id: getting 501-not-implemented errors, which is appropriate for the situation.

So at some layer there is caching of the results of the HTTP calls to localhost:8080, which is wrong.

Does anyone know which layer is caching the HTTP results and how to disable that?


Solution

  • The HTTP response is most likely cached in the Redocly plugin. I have started changing the spec title by including a unique code with every change, and I can see that the spec title in Redocly does not change until I click the "refresh" button (which is not even always visible).

    Not sure why the default is to NOT refresh the spec, or even to check the spec timestamp against the last timestamp.