I created a new block (a view block) but it is not available to use in other modules (like panels). If I clear all cache then it shows up.
I don't want to clear all caches but only the right one to get the same.
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
Block cache is stored in the
The cache ID is decided by the
_block_get_cache_id() function, which you would use like so:
$block = block_load($module_name, $delta); $cid = _block_get_cache_id($block); cache_clear_all('cache_block', $cid);
It's worth bearing in mind that advanced modules like ctools and panels keep their own cache, so if the above doesn't work, have a look through the code for those modules and see what they use instead of the standard block cache to store data. Then clear that one instead.