Mpchadwick_PageCacheHitRate icon indicating copy to clipboard operation
Mpchadwick_PageCacheHitRate copied to clipboard

Ignore requests that are not eligible for FPC

Open sdesmet opened this issue 7 years ago • 3 comments

Hi Max,

Thanks for your great extension and very informative talk on NomadMage on the subject.

I've noticed something though while testing the module. All requests contribute to the hit/miss/partial rate, for instance also the cart page. In some way, I believe that skews the results. Magento out-of-the-box only supports FPC for certain "subprocessors" and the cart page will never be cached, so it's always going to add to the miss total. I'm mostly interested in having the stats on how the FPC is working for pages that should be cached, not the ones that I know will never be cached.

The change in this PR filters out any requests (routes) that would never be cached.

Cheers, Steve

sdesmet avatar Apr 10 '18 06:04 sdesmet

Hey @sdesmet - I wouldn't implement this change as is as I think it's also of value to know your hit rate for ALL requests. It's also interesting to know amongst cache-able pages only. I've filtered by route in my dashboarding tool to get that data. I would consider adding an additional base param from the param provider to say whether or not the page is cacheable so instead of filtering for a set of routes you can just filter for that param to get your hit rate amongst cache-able pages only.

mpchadwick avatar Apr 11 '18 22:04 mpchadwick

Hi @mpchadwick

I think the extra param in the event payload would make for a great addition. Something we could filter on in New Relic Insights. We do have some custom modules that introduce new cache-able routes into FPC and I wouldn't need to know those to get a base line "hit vs misses" monitoring going on any site we run. I'll see if I have some time to change the PR to follow that concept.

Thanks

sdesmet avatar Apr 12 '18 06:04 sdesmet

@mpchadwick

I've added the cacheable param. Please review.

Cheers

sdesmet avatar Apr 14 '18 16:04 sdesmet