Clear specific node data cache used in forms etc.

This is how you can clear specific data from the Drupal cache. I use this when I by background process change data to CCK fields and want to make sure that the values are correct in the form for the user. The cache is otherwise stored in 6 hours for the form, specified in includes/

 * Delete node data cache used for forms etc.
 * @param unknown_type $nid
function _clear_node_cache($nid, $vid = FALSE) {
$vid = $nid;
db_query("DELETE FROM cache_content WHERE cid = 'content:%d:%d';", $nid, $vid);