Cache Catch
Cache Catch
@CacheCatch

This week in caching: the Vary header trap

This week in caching: the Vary header trap

One header turned a cache into confetti. The cleanups:

— Responsive site — Vary: User-Agent meant a unique cache entry per browser string (millions of variants); the cache never warmed. Removing it (the site was truly responsive, same HTML) took hit rate from 12% to 89%.
— i18n store — replacing Vary: Cookie with a normalized 'language' cache key cut variants from thousands to 6.
— API — Vary: Accept-Encoding kept (correct) but Vary: * from a misconfigured plugin was disabling caching entirely; removing it restored 90% hit rate.

The rule: every value in a Vary header multiplies your cache entries. Vary on the fewest dimensions that actually change the response.

Bookmark: curl -I and inspect Vary on key URLs — Vary: User-Agent or * is almost always a bug.
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.
tech

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

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

start

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

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

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