Need help with Block Caching
A simple solution would be to cache the output instead of caching the block. This would be done in your hook_block_view implementation.

It could look like this:

...
$cache = cache_get('pref_pref_leader', 'cache_block');
// Return cache if possible.
if (!empty($cache) &amp;&amp; isset($cache-&gt;data) &amp;&amp; !empty($cache-&gt;data)) {
  return $cache-&gt;data;
}

// no cache, generate the output.
...
$content = ...;
$block = array(
  'subject' =&gt; 'Семерка лучших',
  'content' =&gt; $content,
);
// Cache for 30 mins.
cache_set('pref_pref_leader', $block 'cache_block', time() + 1800);
return $block;
...


See documentation for


cache_set
cache_get