You are here

function boost_cache_directory in Boost 5

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

Returns the full directory path to the static file cache directory.

3 calls to boost_cache_directory()
boost_cache_clear_all in ./boost.api.inc
Deletes all static files currently in the cache.
boost_cache_expire_all in ./boost.api.inc
Deletes all expired static files currently in the cache.
boost_file_path in ./boost.api.inc
Returns the static file path for a Drupal page.

File

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

Code

function boost_cache_directory($user_id = 0, $host = NULL) {
  global $user, $base_url;
  $user_id = 0;

  //(!is_null($user_id) ? $user_id : BOOST_USER_ID);
  $parts = parse_url($base_url);
  $host = !empty($host) ? $host : $parts['host'];

  // FIXME: correctly handle Drupal subdirectory installations.
  return implode('/', array(
    getcwd(),
    BOOST_FILE_PATH,
    $host,
    $user_id,
  ));
}