Tuesday, December 20, 2022
HomeWordPress DevelopmentCache numerous responses from exterior json feeds?

Cache numerous responses from exterior json feeds?


I’ve a undertaking which shows data from about 60 inventory tickers.
The problem is, that the undertaking is making requests each time the web page masses for these 60 shares.

That is form of the way it appears to be like proper now:

    $components = array('Stock1', 'Stock2' , 'Stock3', 'Stock4' , 'Stock5',  'Stock6', 'Stock7', 'Stock8', );

foreach ( $components as $index => $component )  JSON_UNESCAPED_SLASHES);

 ?>

I can not make a mixed (for greater than 1 shares data) request from the API at one time. What can be one of the best ways to cache this? The inventory data shouldn’t be in actual time (delayed by 15 min), so I suppose if I have been in a position to cache outcomes for five minutes every time earlier than downloading them once more, that might be adequate. Any suggestions are appreciated.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments