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

keeps going back to index.html ???????
ok so i started making my site using mostly.html files now i have added a fair chunk of php. My inde

Character Set Setup
Whats the best character set to use if you want every character to work, and also how do you make yo

Multiple Dropdown Selections
I have a form that let's a user insert a page with the ability to select categories. I want them to

Scene graph using Direct3D?
There are several C++ scene graph based packages available for OpenGl, like say OSG,

http://w

Beginners syntax and loop questions - help please!
Hi everyone,

I have some problems with php code. I'm currently in the middle of learning php,

big pagination problem in php
<?php

$connect = mysql_connect("localhost", "root", "")

Is there something wrong?
Hi all,

Just a quick question... can someone look at this code and see if something is wrong?

Recording popularity by day, week.. all time?
Hey everyone, I'm creating a site designed around users uploading music. How can I implement a syste

line breaks in between fetched file names
Hi,

I have this code:
Code: <?php
if($dir = opendir('files')){
while (($f

Oracle Connectivity
Hi Every One,

Can we access SAP from oracle database.If it possible then please spec

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