You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.
It would be interesting displaying Varnish headers (or custom headers) in the profiler with bootstrap badges. I make many GET requests in my app and it would be nice to easily know which requests made hit/miss from Varnish, with Age and Total-Hits.
Any guidelines to make a PR?
Make a new default middleware available
class VarnishCacheMiddleware extends CacheMiddleware
{
const DEBUG_HEADER = 'X-Cache';
}
with
# GuzzleCollector
if ($response->hasHeader('X-Cache') && 'HIT' === $response->getHeaderLine('X-Cache')) {
if ($response->hasHeader('Age')) {
$req['varnish']['age'] = $response->getHeaderLine('Age');
}
if ($response->hasHeader('X-Cache-Hits')) {
$req['varnish']['hits'] = $response->getHeaderLine('X-Cache-Hits');
}
}
The text was updated successfully, but these errors were encountered:
Hi @fnash. I guess the better approach might be to provide extension capabilities to the collector, in order to provide means to extend the current one. We could consider registering services associated to a tag, which would extract some additional information from the request, and let one extend the bundle that way.
What could be great would be to have the possibility to add new sections in the profiler page for each "extension".
It would be interesting displaying Varnish headers (or custom headers) in the profiler with bootstrap badges. I make many GET requests in my app and it would be nice to easily know which requests made hit/miss from Varnish, with Age and Total-Hits.
Any guidelines to make a PR?
Make a new default middleware available
with
The text was updated successfully, but these errors were encountered: