Jump to content

How to limit the calls to an API


greenheart

Recommended Posts

Hello, in my simple script I call an api which effectively involves me getting an xml file.

 

However the problem is everytime I get a visitor to the webpage it calls the API which means lots of wasteful calls to the API as the data their end isn't updated more than once an hour or something.

 

I know how to cache and retrieve the data but what command/s are used to tell my server only to call the API every hour and thus update the cache?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/177796-how-to-limit-the-calls-to-an-api/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.