How to disable cache for my web service?

Hey! I am using render.com for my nodeJS API service with Postgres as a database, and I have strange issue.

All my GET-endpins return the same result for every request even if data in DB is changed.

That means the render has some middleware for caching each request

How to disable it?

Hey there,
Hmm, we don’t have caching like this - It’s worth checking the framework you are using to build your service in, as these can have caching built in and isn’t apparent when you’re developing locally and then deploying to production

John B

I am using nestJS and am sure that cache is not in the framework side because:

  • I am not using any cache in the project
  • I test it with production build and all is working awesome
  • After each deploy the render showing the previous version of my swagger and updating it only after approximately 15 min and it is not browser cache (I did check)

I am using free plan, maybe u have a cache for free plan only? I need to know before upgrade my plan

One more proof that it is a very aggressive cache: If I made the first request with auth token, I can make all next requests to the same endpoint without token and it will back the cached response.

How are you making that request? From a browser - or via curl? Are you able to provide some examples and we can help you figure out what’s going on here?

John B

I am trying:

  • requests from swagger
  • requests from my app FE
  • requests from the postman

And additionally talking about the strange case with swagger cache in FE I used just my chrome browser

Link to swagger from testing - Swagger UI

Additionally, if I add get-param with random string (timestamp for example) all is working correctly. I think it is because cache-service using URL as a key

I see in the headers that u using Cloudflare as CDN, maybe this cache in CDN-side?

Hi there,
We do use CloudFlare but we don’t have Caching enabled - we don’t have any points in the stack that would perform caching on our side like you’re describing.

John B