drupal 5

Pushing your content into Drupal's pre-page bootstrapless cache for fast content!

A hindy tip, good if you have something tricky like custom RSS feeds from modules etc, use this to push your content into Drupal's pre-page cache, Takes about 0.02s on a decent server to pull cache from here, instead of 0.200s if you bootstrap drupal (with ACP!) basically, just ripping off the cache code, gzip'ing the content with the right key.. content goes in $output..
global $base_root;
$data = gzencode($output, 9, FORCE_GZIP);
cache_set($base_root . request_uri(), 'cache_page', $data, CACHE_TEMPORARY, drupal_get_headers());
Syndicate content