1 render_example.module render_example_cache_expensive()

A potentially expensive function.

Return value

string: Some demo text.

Related topics


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


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;