How to limit the calls to an API


Posted on 16th Feb 2014 07:03 pm by admin

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.

Did you know?Explore Trending and Topic pages for more stories like this.
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
No comments posted yet

Your Answer:

Login to answer
70 Like 49 Dislike
Previous forums Next forums
Other forums

array_combine() error
getting an "Warning: array_combine() [function.array-combine]: Both parameters should have an e

SMTP server...
I recently found a tutorial online on SMTP authentification for sending emails from webpages, here i

Drawing Images in classes
I'm quite new to Object Oriented PHP. What I'm trying to do is draw some images but also have other

foreach loop, assistance request
I would like some guidance on the usage of foreach as I try to parse through a large database and wh

http to https
Hi,

Is there any specific method/condition to move an http:// page to https:// ?

Problem with variable declaration in switch statement
Hello, I am having some trouble assigning a value to a variable inside a switch statement. What I a

button.click += new eventhandler() not works in if(!ispostback)
i want to use button.clcik event in function VIewScrap() which is called in if(!ispostback) but itdo

IF Statement & Two Tables With Different Echoes
I'm retrieving two tables in a single query using UNION ALL, like so:

Code: $query = "SE

Displaying values from a SQL count...
Hi,
Easy enough question i just forget the exact method ..
I have ...

Code: //count win

Web Application Recipe
Hi Guys!

I am working with the Web Application recipes. I am currently working on the sen

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash