Caching API Calls with Redis to Work Remotely

How to “disconnect” while still delivering on time

Christopher Lanoue
Graphicacy
2 min readSep 18, 2020

--

Photo by Ketut Subiyanto / Pexels.com

I always want to be able to take my laptop and work from anywhere — Amtrak, the park around the corner, the front stoop. But given that my job involves building web-based data visualizations, it isn’t always easy with little or no wi-fi. I often need to hit an API and work with the real data to get a better sense of how the visualization should look. Instead of generating static files ahead of time and fiddling with the data retrieval piece to read from those files, I use the power of Redis to cache the API results for a few hours while I’m away from the internet.

Benefits

There are at least two benefits of using Redis to power remote work without an internet connection. The first is that when you deploy your application you will have a battle-tested and performant solution for caching and speeding up responses to the client. The second is that during development you will be able to cache long-running or frequent API calls while testing code without hitting API limits or bogging down another organization’s servers.

Christopher Lanoue is a Data Visualization Engineer and Director of Engineering and Innovation at Graphicacy with a focus on designing and building innovative and creative solutions for clients all over the world.

--

--