On sites with multiple domains, it's cumbersome that you have to access the site from the domain to see performance results. It's impossible if you have a separate domain for the administration interface. I kept looking at my performance page expecting to see results, and was only seeing results from the domain that I was looking at.

I think the key should be configurable in settings.php, and use a fallback of using the domain.

CommentFileSizeAuthor
#1 performance-1580018-key-variable.patch2.39 KBq0rban

Comments

q0rban’s picture

Status: Active » Needs review
StatusFileSize
new2.39 KB
malc0mn’s picture

Assigned: Unassigned » malc0mn
Status: Needs review » Fixed

The best stuff is always the most simple. Thanks for the patch! Applied to D7 & D6 versions. Available in next release.

I moved it out of hook_boot() though and simply used:

  define('PERFORMANCE_KEY', 'dru-perf:' . variable_get('performance_key', $_SERVER['HTTP_HOST']) . ':');

instead of

  $key = variable_get('performance_key') ? variable_get('performance_key') : $_SERVER['HTTP_HOST'];
  define('PERFORMANCE_KEY', "dru-perf:{$key}:");

Or did that all have a specific reason? variable_get() handles the isset() itself...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.