function render_example_cache_expensive

A potentially expensive function.

Return value

string Some demo text.

Related topics

1 call to render_example_cache_expensive()
render_example_cache_pre_render in render_example/render_example.module
A '#pre_render' function.

File

render_example/render_example.module, line 205

Code

function render_example_cache_expensive() {
    $interval = 60;
    $time_message = t('The current time was %time when this was cached. Updated every %interval seconds', array(
        '%time' => date('r'),
        '%interval' => $interval,
    ));
    // Uncomment the following line to demonstrate that this function is not
    // being run when the rendered array is cached.
    // drupal_set_message($time_message);
    return $time_message;
}