I'm updating CCK fields directly via SQL for specific design reasons, however the cache needs refreshing after the update.

In earler 5.x designs of my website I just cleaned the entire cache table, but I'm wondering if there is a more elegant 6.x way of doing it.

Thanks,

Comments

drupeo’s picture

I'm updating a field's value in a custom content type using sql, and I have to clear the cache_content & cache_forms tables most times for the data to be refreshed. I think there is only one record in each table that needs to be deleted, but I'd like some clarification on what the keys (cid) for these records are.

The cache_content cid appears to be "content:nid:nid", but the cache_form is not as obvious, it seems I need to use the form_build_id?

Is the correct way to invalidate the cache for nodes that we change directly? Or is there a drupal way to perform the update so that the cache is automatically cleared or refreshed when the update is done?