Views content cache uses ctools to provide a plugable cache segment system. This means that as a developer you can add monitoring of a cache segment with only about 20 lines of code, nice!

Getting started

You'll need to implement the ctools plugin hook:

/**
 * Implementation of hook_ctools_plugin_api().
 */
function MODULENAME_ctools_plugin_api($module, $api) {
  if ($module == 'views_content_cache' && $api == 'plugins') {
    return array('version' => 1);
  }
}

This informs ctools that you implement one or more Views content cache plugins. You then need to describe your actual plugin to ctools with the following hook:

/**
 * Implementation of hook_views_content_cache_plugins().
 *
 * This is a ctools plugins hook.
 */
function MODULENAME_views_content_cache_plugins() {
  $plugins = array();
  $plugins['plugin_name'] = array(
    'handler' => array(
      'path' => drupal_get_path('module', 'MODULENAME') . '/plugins',
      'file' => 'plugin_name.inc',
      'class' => 'views_content_cache_key_MODULENAME', // This should correspond to the class of your plugin.
      'parent' => 'base',
    ),
  );
  return $plugins;
}

Then, for your actual plugin, you'll want to define a class in the file you specified in the above hook:

class views_content_cache_key_MODULENAME extends views_content_cache_key {
  // Class specific implementations of methods go here.
}

And finally add the following line to the .info file of your module:

files[] = plugins/plugin_name.inc

You'll need to clear Drupal's cache for your plugin to be detected by ctools and Views content cache, but then you'll be able to fill out your plugin's class with methods that change the default behaviour. There's quite a lot of documentation about each method in the base class, and you should read that and look at the existing plugins to see how to use each method.