You are here

function boost_cache_get in Boost 5

Same name and namespace in other branches
  1. 6 boost.module \boost_cache_get()

Returns the cached contents of the specified page, if available.

File

./boost.api.inc, line 102
Implements the Boost API for static page caching.

Code

function boost_cache_get($path) {
  $path = drupal_get_normal_path($path);

  // normalize path
  if ($filename = boost_file_path($path)) {
    if (file_exists($filename) && is_readable($filename)) {
      return file_get_contents($filename);
    }
  }
  return NULL;
}