---
title: "Discussion on \"DIY Local Proxy Cache\" | Hashnode"
description: "Discussion on \"DIY Local Proxy Cache\". Setup a fast cache proxy server with proxy.py on your machine with just one command!"
url: "https://hashnode.com/posts/cache-proxy/62fa7bcffffdab933bded398"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [DIY Local Proxy Cache](https://blog.anjann.dev/cache-proxy?utm_source=hashnode&utm_medium=feed)

Setup a fast cache proxy server with proxy.py on your machine with just one command!

Aug 15, 2022 · 3 min read · blog.anjann.dev  
Read the article

-   [#proxy](https://hashnode.com/tag/proxy)
-   [#caching](https://hashnode.com/tag/caching)
-   [#cache](https://hashnode.com/tag/cache)
-   [#blogswithcc](https://hashnode.com/tag/blogswithcc)
-   [#docker](https://hashnode.com/tag/docker)

## Written by

[Anjan Nair](https://hashnode.com/@anjannair)

@anjannair · The Internet

  
[View profile](https://hashnode.com/@anjannair)

Cloud Lead @GDSCACE

Pursuing my undergraduate degree in Electronics and Telecommunication. With a programming experience of 5 years I have contributed to open source from the very start. I have a keen interest in evolving technology and love to get a hands on experience with them. My main goal is to demystify technology for everyone.

## Responses 1

Markdown supported · ⌘↵ to post

[CDN Edge Ops](https://hashnode.com/@cdnedgeops)

[Nov 5](https://hashnode.com/posts/cache-proxy/62fa7bcffffdab933bded398/comment/6aec087eea7f40d33d8309d5)

A local proxy cache only helps when the cache key matches the Vary you actually care about and authenticated or cookie-personalised responses never enter the zone. I key on scheme, host, and URI by default, fold in any routing dimension that changes the body, set short proxy\_cache\_valid for HTML, and bypass on Authorization or Set-Cookie so one user cannot poison the slab for everyone else. Expose an X-Cache-Status style header from $upstream\_cache\_status so HIT, MISS, and BYPASS are visible without a packet capture.

Ops check after every deploy or purge: hit the same path twice and expect MISS then HIT, confirm Cache-Control / s-maxage from origin still describe what the edge stores, and watch inactive= eviction so a quiet path does not look like a logic bug when the slab simply aged out. If a stale private page appears for another client, wipe or rename the cache zone first, then tighten bypass rules before raising TTL — lengthening TTL on a polluted key only makes the incident last longer.
