Sometimes when you are building a module for drupal 6 you may encounter this situation :

" ... Trying to get a data loaded to form or theme using node_load($nid) function ... "

And you have make sure that you have changed the database entry for the related node :

" ... I am using ajax query to change the database entry for xxx field in the cck content type ..."

But why the loaded data from node_load still show the old database entry as before the ajax change?

The answer is "Cache" seems that cck have a cache in the table that will show the old data if its not cleared.

If you save the data using node_save() or other drupal API besides the straight db_query(UPDATE....) then automatically the cached is updated / flushed to show the latest change.

In other hand if you update the database using db_query method then you will need to force clear the cck cache manually by invoking :

db_query("DELETE FROM {cache_content} WHERE cid = '%s'", 'content:' . $node->nid . ':' . $node->vid);

So while cache is important to speed up your web page loads, without the proper knowledge to handle the cache... frustration is near.