The currently used code is the following one.

foreach ($clears as $bin => $cids) {
  $cache = _cache_get_object($bin);
  foreach ($cids as $serialized_cid => $wildcard) {
    $cache->clear(unserialize($serialized_cid), $wildcard);
  }
}

Instead of calling a function, and then a method on the returned object, it sufficient to call cache_clear_all().

foreach ($clears as $bin => $cids) {
  foreach ($cids as $serialized_cid => $wildcard) {
    cache_clear_all(unserialize($serialized_cid), $bin, $wildcard);
  }
}

Issue fork apc-3461836

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

apaderno created an issue. See original summary.

avpaderno’s picture

Status: Active » Needs review

  • apaderno committed cf1373ca on 7.x-1.x
    Issue #3461836: Do not use call _cache_get_object() to clear cache
    
avpaderno’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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