In Magento, cache hit depends on specific headers:
- `X-Magento-Tags`
- `X-Magento-Cache-Control`
- `X-Magento-Vary`
When a module adds extra headers, Varnish treats the request as different.
Operational tips:
- Normalize headers with `req.http` in VCL.
- Avoid `Set-Cookie` on public pages.
- Review HTML `Cache-Control`.
In incidents, first check if HTML has `X-Magento-Cache-Debug: HIT`.
If not, the issue isn’t “more hardware”: it’s cache misconfiguration.
Common errors:
- `Vary` too long.
- Inconsistent `X-Forwarded-Proto` between Cloud and Varnish.
- Tracking cookies that invalidate full cache.
In Magento, the problem is often a marketing header. Remove it and hit rate jumps without infra changes.
- `X-Magento-Tags`
- `X-Magento-Cache-Control`
- `X-Magento-Vary`
When a module adds extra headers, Varnish treats the request as different.
Operational tips:
- Normalize headers with `req.http` in VCL.
- Avoid `Set-Cookie` on public pages.
- Review HTML `Cache-Control`.
In incidents, first check if HTML has `X-Magento-Cache-Debug: HIT`.
If not, the issue isn’t “more hardware”: it’s cache misconfiguration.
Common errors:
- `Vary` too long.
- Inconsistent `X-Forwarded-Proto` between Cloud and Varnish.
- Tracking cookies that invalidate full cache.
In Magento, the problem is often a marketing header. Remove it and hit rate jumps without infra changes.
Comments