When do hook_views_data() and hook_views_data_alter() get called?
In case anyone else is making the same mistake I was, here's the answer.


First of all, hook_views_data() will not ever, ever be called if you put it in yourmodule.module. It has to be in yourmodule.views.inc.
You should probably implement hook_views_api() to tell Drupal where your yourmodule.views.inc file resides. Do so like this:


function yourmodule_views_api($module = NULL, $api = NULL) {
  return array(
    'api' =&gt; '3.0',
    'path' =&gt; drupal_get_path('module', 'yourmodule') . '/includes/views',
  );
}


This tells Drupal that yourmodule.views.inc can be found at /yourmodule/includes/views/yourmodule.views.inc. If you don't use hook_views_api(), put the .inc file in the same folder as your .module file.

Once you have this set up, yourmodule_views_data() will be called when you clear the caches.