Php function to clear cache for regions I made a custom module, in which I dynamically add regions. The thing is, I want to make just the region part of the cache to refresh after. So drupal_flush_all_caches(); isn't the solution, since this takes too long, as well as it sometimes crashes the site.

Could anyone tell me which function I need to specifically clear the region/blocks cache? I tried all logical functions from the drupal_flush_all_caches(); function. I also couldn't find the right call from cache_clear_all();.

Any help would be appreciated.
You are looking for cache_clear_all. You want to set first argument $cid to NULL, as you want expire all your objects. Now you only need to figure second argument, $bin. For sure you have to clear cache_page bin. If it's not enough, look inside your database for cache_% tables (where % means any string, per SQL standard) to know what bins are available to you.

Last but not least, dynamic regions may be huge performance hit. Think twice if that's what you really need.