Harnessing Client-Side Caching in Rails: The Power of `expires_in`

Ackshaey Singh
3 min readOct 5, 2023

In your journey as a software developer, you’ll encounter myriad tools and techniques designed to optimize and streamline web applications. One such tool, often overlooked, is client-side caching. As backend and full-stack engineers, we spend hours crafting complex caching layers on the backend. However, we often overlook the most effective caching technique: having the request never reach the backend! Let’s delve into how requests get cached on the client using the Cache-Control header.

Cache Control Header

--

--

Ackshaey Singh

Founder @ firecode.io / designerdiscount.club | Ex Staff SWE / Manager @Opendoor | Ex @Twitter Ads Engineering