WordPress at a glance
function is not described

wpsc_is_in_cache_directory() WPSCache 1.0

return true if directory is in the cache directory

No Hooks.

Return

null. Nothing.

Usage

wpsc_is_in_cache_directory( $directory );
$directory (required)
-

Code of wpsc_is_in_cache_directory() WPSCache 1.7.3

<?php
function wpsc_is_in_cache_directory( $directory ) {
	global $cache_path;
	static $rp_cache_path = '';

	if ( $directory == '' ) {
		wp_cache_debug( 'wpsc_is_in_cache_directory: exiting as directory is blank' );
		return false;
	}

	if ( $cache_path == '' ) {
		wp_cache_debug( 'wpsc_is_in_cache_directory: exiting as cache_path is blank' );
		return false;
	}

	if ( $rp_cache_path == '' ) {
		$rp_cache_path = wpsc_get_realpath( $cache_path );
	}

	if ( ! $rp_cache_path ) {
		wp_cache_debug( 'wpsc_is_in_cache_directory: exiting as cache_path directory does not exist' );
		return false;
	}

	$directory = wpsc_get_realpath( $directory );

	if ( ! $directory ) {
		wp_cache_debug( 'wpsc_is_in_cache_directory: directory does not exist' );
		return false;
	}

	if ( substr( $directory, 0, strlen( $rp_cache_path ) ) == $rp_cache_path ) {
		return true;
	} else {
		return false;
	}
}