Clear block cache in panels page I'm having trouble with refreshing content in a block created with a custom module, placed within a panels page. My end goal is to display either regular or seasonal hours based on a set date range. My hook_theme() implementation looks like the following:

function daily_hours_theme() {
  if (daily_hours_is_summer()) {
    $table_template = daily_hours_get_summer_vars();
  } else {
    $table_template = daily_hours_get_regular_vars();
  }
  $items =  array(
    'todays_hours_table' =&gt; $table_template,
    'daily_hours_text_content' =&gt; array(
      'render element' =&gt; 'element',
    )
  );
  return $items;
}


I'm using hook_block_info() to test cache settings; the following doesn't seem to have an effect on caching:

function daily_hours_block_info() {
  $blocks['hours_table'] = array(
    'info' =&gt; t('Daily Hours Table'),
    'cache' =&gt; DRUPAL_NO_CACHE,
  );
  return $blocks;
}


And hook_block_view() to call the theme function:

function daily_hours_block_view($delta = '') {
  switch ($delta) {
    case 'hours_table':
      $block['content'] = theme('todays_hours_table');
      break;
  }
  return $block;
}


Ideally, I'd clear the module's block data at midnight every day, but I'd settle for just knowing how to implement any caching rules in this context.
The variables were being cached at some point in the hook_theme() function, so after reading the documentation on hook_theme(), I moved the logic to conditionally use different variables in to my hook_block_view() implementation, passing them in to the call to theme() at that point. So that function looks like the following:

function daily_hours_block_view($delta = '') {
  if (daily_hours_is_summer()) {
    $variables = daily_hours_get_summer_vars();
  } else {
    $variables = daily_hours_get_regular_vars();
  }
  switch ($delta) {
    case 'hours_table':
      $block['content'] = theme('todays_hours_table', $variables);
      break;
  }
  return $block;
}


And my hook_theme() function:

function daily_hours_theme() {
   $items =  array(
     'todays_hours_table' =&gt; array(
       'template' =&gt; 'hours_table',
       'variables' =&gt; array(
          // set default variables here
       )
     )
   );
   return $items;
 }


The cache setting in my hook_block_info() implementation did not seem to have an impact once I set up the logic in the hook_block_view() function.