Custom block cached for too long

Likeless - November 20, 2008 - 13:10

I have a custom module that lists nodes in a particular way. Because the content it lists is universal, I have set the cache settings to BLOCK_CACHE_GLOBAL.

However, when new nodes are added, the block is still showing the old cached data from 30 hours ago.

Clearing the cache caused the block to update, so I know the problem is the data being cached and not an issue in the custom code.

I can see hack solutions (hook_nodeapi,hook_cron), but I'm sure there must be a more Drupalish fix to ensure the block updates regularly, or when content is added/modified?

 
 

Drupal is a registered trademark of Dries Buytaert.