The module uses a shutdown callback to show information about which values have been retrieved in the cache, set, or deleted. Since it is a very low-level function, it needs to:

  • Check what Drupal returned (HTML markup, plain text, XML, an image), while it is only interested to add its own output when Drupal outputs HTML markup
  • Verify theme() is available, and be sure the theme registry is not rebuilt

It is also added to the list of the shutdown callbacks to invoke in hook_init(), which is not invoked for cached pages.

Implementing hook_page_alter(), the code would be simpler.

Furthermore, instead of using a global variable, the code should use a DrupalApcCache static property, accessible via a static method.

Issue fork apc-3463295

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

avpaderno created an issue. See original summary.

avpaderno’s picture

Issue summary: View changes

avpaderno’s picture

Status: Active » Needs review

  • avpaderno committed 90cde162 on 7.x-1.x
    Issue #3463295: Replace the shutdown callback with hook_page_alter()
    
avpaderno’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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