Hi @all,

I have two issues with the coder cache:

1. The cache key gets too long for the database column, when a lot of reviews are executed. This happens because ALL review names get appended to the cache key:

$cache_key = 'coder:' . implode(':', array_keys($coder_args['#reviews'])) . $coder_args['#severity'] . ':' . $coder_args['#filename'];

I think something like this would easily solve this problem:

$cache_key = 'coder:' . md5(implode(':', array_keys($coder_args['#reviews'])) . $coder_args['#severity'] . ':' . $coder_args['#filename']);

2. An implementation of hook_flush_caches() is missing. You m ay use this snippet:

/**
 * Implements hook_flush_caches().
 */
function coder_flush_caches() {
  return array('cache_coder');
}

I'd appreciate if these features may find their way into the code :-)

Thanx in advance & cheers

hctom

Comments

stella’s picture

Version: 7.x-1.x-dev » 6.x-2.x-dev
Status: Active » Fixed

Committed to both 7.x-1.x and 6.x-2.x branches, thanks!

Status: Fixed » Closed (fixed)

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