Jump to content

Does the API cache requests?


InfinityRazz
 Share

Go to solution Solved by Stuart Silvester,

Recommended Posts

Hey guys, I am attempting to request records from a DB at the follow API end point.

api/cms/records/{database_id}

I am making this request using a valid API key and the request returns as expected. However, I find that the first request will return in ~1100 ms and then fall down to a stead 200ms per request. 

Users and other applications are pushing updates to these records. However when I request the records I get an accurate return maybe once every minute, every other request returns the exact same information despite the records being updated. (Confirmed this by viewing the database page. Refreshing the page shows the updated records but the API request does not.)

It might be worth pointing out that we recently just updated from 4.5.4 to 4.6.8, previously the request was working just fine.

All in all I am just wondering if it is at all possible to remove the caching on my DB request, I can't find any settings along though lines 😅 and I am kind of on a dead line... So any help would go a long way.

Thanks !
 

Link to comment
Share on other sites

  • Solution

Hi,

Yes, it's possible for REST API output to be cached at a CDN (content delivery network) level, this is also the case on our Cloud. If you must have real-time data, you can always pass an extra cache bust parameter with your request to make the request unique. Something like &ts=<unixtimestamp> would be fine.

Try not to use this too much though as you'll lose the benefit of faster responses.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...