Hello, world!"; $theme = 'bartik'; if ($phase == 'runtime') { // The echo_themed_page() function should be available at this point. $document = new DomDocument(); $document->loadHTML(echo_themed_page($title, $content, $theme)); $xpath = new DOMXpath($document); $pass = $xpath->query("//div[@id='$uniqid']"); } else { $key = sha1($title . $content . $theme); // Thirty seconds ought to be enough for anyone. $expiration = REQUEST_TIME + max(ini_get('max_execution_time'), 30); cache_set($key, $key, 'cache', $expiration); sleep(1); $cached = cache_get($key); $pass = ($cached->data === $key); } return array( 'echo' => array( 'title' => t('Cache system'), 'description' => t('The %echo module requires a working cache system.', array('!echo' => 'http://drupal.org/project/echo', '%echo' => 'Echo')), 'value' => $pass ? t('Working') : t('Not working'), 'severity' => $pass ? REQUIREMENT_OK : REQUIREMENT_ERROR, ), ); }