Currently doing work on an alternative DB-based cache backend for Drupal that increases cache hit rate, but finding it hard to get any reliable metrics on it. Would be handy to keep track of this in accesslog.

Maybe a -1 meaning "not intended to be cached" (e.g. logged in user or page cache is disabled), 0 for cache miss, 1 for cache hit.

Needs an extra column in accesslog for "cachehit," and an extra line in statistics_exit(). Is the X-Drupal-Cache header reliable enough to use for this?

Would also be lovely to backport to 7.x.

Comments

iamEAP’s picture

Status: Active » Closed (won't fix)

Closing my own issue. Accesslog was removed from core Statistics #1446956: Remove the accesslog from statistics

For those keeping score at home, this was what originally inspired the Better Statistics module, which implements this very feature.

fgm’s picture

Project: Drupal core » Statistics
Version: 8.0.x-dev » 1.0.0
Component: statistics.module » Code
Issue summary: View changes
Status: Closed (won't fix) » Active

Questionable whether we can find a way to do this in newer versions, because of the 2-step loading, but moving to contrib just to keep it in mind.

anybody’s picture