time() ) { $meta = new CacheMeta; if (! ($meta = unserialize(@file_get_contents($meta_pathname))) ) return; foreach ($meta->headers as $header) { // godaddy fix, via http://blog.gneu.org/2008/05/wp-supercache-on-godaddy/ and http://www.littleredrails.com/blog/2007/09/08/using-wp-cache-on-godaddy-500-error/ if( strpos( $header, 'Last-Modified:' ) === false ) header($header); } if ( !($content_size = @filesize($cache_file)) > 0 || $mtime < @filemtime($cache_file)) return; if ($meta->dynamic) { include($cache_file); } else { /* No used to avoid problems with some PHP installations $content_size += strlen($log); header("Content-Length: $content_size"); */ if(!@readfile ($cache_file)) return; } die; } $file_expired = true; // To signal this file was expired } function wp_cache_postload() { global $cache_enabled; if (!$cache_enabled) return; require( WPCACHEHOME . 'wp-cache-phase2.php'); wp_cache_phase2(); } function wp_cache_get_cookies_values() { $string = ''; while ($key = key($_COOKIE)) { if (preg_match("/^wp-postpass|^wordpress|^comment_author_/", $key)) { $string .= $_COOKIE[$key] . ","; } next($_COOKIE); } reset($_COOKIE); if( $string != '' ) return $string; $string = do_cacheaction( 'wp_cache_get_cookies_values', $string ); return $string; } function add_cacheaction( $action, $func ) { global $wp_supercache_actions; $wp_supercache_actions[ $action ][] = $func; } function do_cacheaction( $action, $value = '' ) { global $wp_supercache_actions; if( is_array( $wp_supercache_actions[ $action ] ) ) { $actions = $wp_supercache_actions[ $action ]; foreach( $actions as $func ) { $value = $func( $value ); } } return $value; } ?>