Table of Contents

  1. Overview
  2. Local caching
  3. API Scaffolding
  4. Creating the HTTP client
  5. Seeing it in action

Overview

I recently started writing a wrapper around an API that rate limits you after 60 requests/minute. This is pretty low in the grand scheme of software, but its responses effectively don’t change after a single query. With that in mind, it seemed like a great time to implement a local cache that is stored on disk and platform agnostic.

Local caching

There’s a bunch of great caching options that range from storing things in memory at startup to using Redis or other database services, but this tutorial will keep things straight forward: storing respons…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help