Build a form identifier that we can use to see if one form is the same as another. Since the arguments differ slightly we do a lot of spiffy concatenation here.
public function buildIdentifier($key, $display_id, $args) {
$form = views_ui_ajax_forms($key);
// Automatically remove the single-form cache if it exists and
// does not match the key.
$identifier = implode('-', array(
$key,
$this
->get('name'),
$display_id,
));
foreach ($form['args'] as $id) {
$arg = !empty($args) ? array_shift($args) : NULL;
$identifier .= '-' . $arg;
}
return $identifier;
}