You are here

function views_content_cache_views_content_cache_plugins in Views content cache 6.2

Same name and namespace in other branches
  1. 7.3 views_content_cache.module \views_content_cache_views_content_cache_plugins()

Implementation of hook_context_plugins().

This is a ctools plugins hook.

File

./views_content_cache.module, line 438
Views content cache cache.

Code

function views_content_cache_views_content_cache_plugins() {
  $plugins = array();
  $plugins['base'] = array(
    'abstract' => TRUE,
    'handler' => array(
      'path' => drupal_get_path('module', 'views_content_cache') . '/plugins',
      'file' => 'base.inc',
      'class' => 'views_content_cache_key',
    ),
  );
  $plugins['node'] = array(
    'title' => t('Node type'),
    'description' => t('Invalidates cache by node type'),
    'handler' => array(
      'path' => drupal_get_path('module', 'views_content_cache') . '/plugins',
      'file' => 'node.inc',
      'class' => 'views_content_cache_key_node',
      'parent' => 'base',
    ),
  );
  $plugins['node_only'] = array(
    'title' => t('Pure node updates only'),
    'description' => t('Invalidates cache for main node operations'),
    'handler' => array(
      'path' => drupal_get_path('module', 'views_content_cache') . '/plugins',
      'file' => 'node_only.inc',
      'class' => 'views_content_cache_key_node_only',
      'parent' => 'base',
    ),
  );
  if (module_exists('comment')) {
    $plugins['comment'] = array(
      'title' => t('Comment'),
      'description' => t('Invalidates cache when comments are posted or updated'),
      'handler' => array(
        'path' => drupal_get_path('module', 'views_content_cache') . '/plugins',
        'file' => 'comment.inc',
        'class' => 'views_content_cache_key_comment',
        'parent' => 'base',
      ),
    );
  }
  if (module_exists('og')) {
    $plugins['og'] = array(
      'handler' => array(
        'path' => drupal_get_path('module', 'views_content_cache') . '/plugins',
        'file' => 'og.inc',
        'class' => 'views_content_cache_key_og',
        'parent' => 'base',
      ),
    );
  }
  if (module_exists('nodequeue')) {
    $plugins['nodequeue'] = array(
      'title' => t('Nodequeue'),
      'description' => t('Invalidates cache when a nodequeue is altered'),
      'handler' => array(
        'path' => drupal_get_path('module', 'views_content_cache') . '/plugins',
        'file' => 'nodequeue.inc',
        'class' => 'views_content_cache_key_nodequeue',
        'parent' => 'base',
      ),
    );
  }
  if (module_exists('votingapi')) {
    $plugins['votingapi'] = array(
      'handler' => array(
        'path' => drupal_get_path('module', 'views_content_cache') . '/plugins',
        'file' => 'votingapi.inc',
        'class' => 'views_content_cache_key_votingapi',
        'parent' => 'base',
      ),
    );
  }
  return $plugins;
}