1 render_example.module render_example_cache_expensive()

A potentially expensive function.

Return value

string: Some demo text.

Related topics

File

modules/examples/render_example/render_example.module, line 199
Hook implementations for the Render Example module.

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.
  // backdrop_set_message($time_message);
  return $time_message;
}