WordPress at a glance
function is not described

WP_Super_Cache_Rest_Update_Settings::set_wp_cache_location() protected WPSCache 1.0

{} It's a method of the class: WP_Super_Cache_Rest_Update_Settings{}

No Hooks.

Return

Null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->set_wp_cache_location( $value );
$value(mixed) (required)

Code of WP_Super_Cache_Rest_Update_Settings::set_wp_cache_location() WPSCache 1.7.1

<?php
protected function set_wp_cache_location( $value ) {
	global $cache_path;

	if ( $value != '' && ( ! isset( $cache_path ) || $value != $cache_path ) ) {
		$dir = realpath( trailingslashit( dirname( $value ) ) );
		if ( $dir == false ) {
			$dir = WP_CONTENT_DIR . '/cache/';

		} else {
			$dir = trailingslashit( $dir ) . trailingslashit( wpsc_deep_replace( array(
					'..',
					'\\'
				), basename( $value ) ) );
		}

		$new_cache_path = $dir;

	} else {
		$new_cache_path = WP_CONTENT_DIR . '/cache/';
	}

	if ( $new_cache_path != $cache_path ) {
		if ( file_exists( $new_cache_path ) == false ) {
			rename( $cache_path, $new_cache_path );
		}

		$cache_path = $new_cache_path;
		wp_cache_setting( 'cache_path', $cache_path );
	}
}