Why is my Cache Expire "0" even when I set it to be time() + 3600? I'm caching our hefty menu output with the function show below, as each menu item loads two views (menu popups with sub-taxonomy data as a viewfield). This rids us of about 800 extra queries per pageload since Views Argument Caching doesn't work properly, and static caching seemed liked the easiest way to work around the problem. Also the data doesn't need to be that fresh.

Now the issue is, we want the data to be cleared whenever cron runs -- and I'm setting the expire timestamp to be +1 hour from the moment it gets cached, but when checking custom_data CID from cache table the expire timestamps shows a 0 (never), instead of the now + hour. Any ideas?

/*
 * Check  if we already have main navigation in cache, if not, render it
 */
function mymodule_render_main_menu() {
  $navigation = &amp;drupal_static(__FUNCTION__);

  if ( !isset($navigation) ) {
    // Check if we have cached data
    if ( $cache = cache_get('custom_data') ) {
      dsm("Nav from cache");
      $navigation = $cache-&gt;data;
    }
    // Else render the main navigation
    else {
      // Get main menu block
      $navigation = menu_block_block_view('1');
      $expire = time() + 3600;
      dsm($expire);

      // Set it's caching to 60min
      $navigation['#cache'] = array(
        'cid' =&gt; 'custom_data',
        'bin' =&gt; 'cache',
        'expire' =&gt; $expire
      );

      // Render the menu
      $navigation = render($navigation['content']);

      // Push rendered data to cache
      cache_set('custom_data', $navigation, 'cache');
    }
  }

  return $navigation;
}
Worked using cache_set('custom_data', $navigation, 'cache', $expire);