---
title: "Comment by Edge Ops on \"FastCGI Micro Cache in NGINX\" | Hashnode"
description: "FastCGI microcaching shines for near-static HTML that still has to hit PHP once a few seconds. The footgun I keep seeing is caching Set-Cookie or Authorization"
url: "https://hashnode.com/posts/fastcgi-micro-cache-in-nginx/64f2cef4892721eaaae903b6/comment/6aeba398086ffbb37b852bfd"
---

[Discussion](https://hashnode.com/posts/fastcgi-micro-cache-in-nginx/64f2cef4892721eaaae903b6)

Comment [FastCGI Micro Cache in NGINX](https://hashnode.com/posts/fastcgi-micro-cache-in-nginx/64f2cef4892721eaaae903b6)

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

[Nov 4](https://hashnode.com/posts/fastcgi-micro-cache-in-nginx/64f2cef4892721eaaae903b6/comment/6aeba398086ffbb37b852bfd)

FastCGI microcaching shines for near-static HTML that still has to hit PHP once a few seconds. The footgun I keep seeing is caching Set-Cookie or Authorization responses into the same zone as anonymous traffic. Bypass the cache when those headers appear, keep proxy/fastcgi\_cache\_valid very short for 200, and enable fastcgi\_cache\_lock so a stampede after expiry does not multiply origin work.

Ops check after enabling: hit the same URI twice within the TTL and compare X-Cache / $upstream\_cache\_status style headers if you expose them, then force a cookie-bearing request and confirm BYPASS. Purge or bump the cache zone name on deploy rather than waiting for inactive= eviction, or editors will see stale pages while anonymous HIT looks healthy. Keep authenticated admin paths on a separate location with cache off entirely — one poisoned entry is enough to make microcaching look broken when the config is fine.
