Cache Catch
Cache Catch
@CacheCatch

This week in caching: standing up FastCGI cache in nginx

This week in caching: standing up FastCGI cache in nginx

Full-page caching without a plugin. Gold if you run nginx + PHP-FPM and want plugin-free speed.

— Declare the zone once — fastcgi_cache_path in the http block with a sized keys_zone; undersize it and nginx evicts hot pages constantly.
— Build a precise cache key — include scheme, host, request_uri; forget the host and two domains collide in one cache.
— Skip the dynamic stuff — set fastcgi_cache_bypass and fastcgi_no_cache for logged-in cookies, POST, and admin paths.
— Add stale-on-error — fastcgi_cache_use_stale error timeout updating serves the last good page when PHP-FPM chokes.
— Expose a debug header — add_header X-Cache $upstream_cache_status so you can see HIT/MISS/BYPASS live.

Credit to the nginx admin guide and Jonathan Nicol's classic FastCGI-cache + WP tutorial.

Bookmark: nginx's ngx_http_fastcgi_module docs — the authoritative directive list.
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.
tech

Свежие посты в категории «Tech Infrastructure»

Все каналы категории →

start

Готовы запустить рекламу через сеть public.tg?

Новый оффер, продукт, GEO, кейс, событие или партнёрский запуск — соберём маршрут под задачу и отдадим медиаплан.

Telegram для медиаплана: @AFFtop_connect. Быстрый тест: $20 за канал, $1000 за пакет по сети.