Hi,
Is there a way to cache requests? I'm using this on the footer of my website and got stuck really quickly with this error. Not good at caching json data like this, so could you give me a hint what to do?
What should I do to this part of the code to not requesting on every refresh? I've tried something with php functions apc_store and apc_fetch but they won't work.
$untappd = new Pintlabs_Service_Untappd($config);
try {
$feed = $untappd->userFeed($username = 'rolle', '1', '');
} catch (Exception $e) {
die($e->getMessage());
';
}
foreach ($feed->response->checkins->items as $i) {
foreach ($i->media->items as $media) {
if(isset($media->photo->photo_img_md)) {
echo $media->photo->photo_img_md;
} else {
echo 'fallback.jpg';
}
echo '
'.$i->beer->beer_name.'
';
echo '
'.$i->beer->beer_style.'
';
}