18a

Implementing caching to speed up a flickr API implementation

13th February 2014 03:00 by lisa

Western Design Architects came to us with an extremely slow site. And I mean sllooowww!

The site gets all it's images from Flickr - a great idea meaning WDA only need to upload their photos in 1 place for exposure in 2, they can utilise Flickr apps for getting their latest photos onto all their Android devices, and they don't need to worry about storing years worth of big photos on their own hosting.

However, the conversation the website has to have with Flickr was causing the site to run extremely slowly - some pages were taking up to 20 minutes to load! And that's obviously completely beyond usable.

So Tom implemented a caching system, whereby every 24 hours the next visitor to a page causes the site to save a HTML version of that page meaning it's then faster for everyone after that point, for the next 24 hours. However, that still meant that one person every 24 hours would have an extremely slow experience because they'd experience the site in it's natural state in order to trigger the caching. So next he built a robot to spider all of the pages of the site every night so that it's the robot which experiences the slow loading and all real visitors see each page pretty much instantly.

As you can guess, after a long time of having a very slow running site to the extent that it was practically unusable at times the client was very happy with the results after just 1 days investigation and work!

If you're having problems with your site running slowly, please get in touch.