DrupalApcCache::binKey() and DrupalApcCache::key() can be replaced with a single method. In fact, the latter is essentially a wrapper for the first. The new method should also be protected, not private.

  /**
   * Gets the key to use in APC calls.
   *
   * @param string $cid
   *   The cache ID.
   *
   * @return string
   *   The key which can be used in APC calls to avoid conflicts with other
   *   keys.
   */
  protected function keyName($cid = NULL) {
    $key_name = $this->prefix . $this->bin;

    if (!is_null($cid)) {
      $key_name .= "::$cid";
    }

    return $key_name;
  }

Issue fork apc-3463180

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

Priority: Normal » Minor
Issue summary: View changes

avpaderno’s picture

Status: Active » Needs review

  • avpaderno committed 105841e9 on 7.x-1.x
    Issue #3463180: Replace DrupalApcCache::binKey() and DrupalApcCache::key...
avpaderno’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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