public function setCacheDir($dir)
    {
        $this->cacheDir = rtrim($dir, '/\\') . DIRECTORY_SEPARATOR;
        if (!file_exists($this->cacheDir)) {
            mkdir($this->cacheDir, 0777, true);
        }
        if (is_writable($this->cacheDir) === false) {
            throw new Exception('The cache directory must be writable, chmod "' . $this->cacheDir . '" to make it writable');
        }
    }
public function setCacheDir($dir)
    {
        $this->cacheDir = rtrim($dir, '/\\') . DIRECTORY_SEPARATOR;
        if (!file_exists($this->cacheDir)) {
            mkdir($this->cacheDir, 0777, true);
        }
        if (is_writable($this->cacheDir) === false) {
            throw new Exception('The cache directory must be writable, chmod "' . $this->cacheDir . '" to make it writable');
        }
    }
public function setCacheDir ( $ dir ) { $ this -> cacheDir = rtrim ( $ dir , '/\\' ) . DIRECTORY_SEPARATOR ; if ( ! file_exists ( $ this -> cacheDir ) ) { mkdir ( $ this -> cacheDir , 0777 , true ) ; } if ( is_writable ( $ this -> cacheDir ) === false ) { throw new Exception ( 'The cache directory must be writable, chmod "' . $ this -> cacheDir . '" to make it writable' ) ; } }
Sets the cache directory and automatically appends a DIRECTORY_SEPARATOR.

@param string $dir the cache directory

@return void
@throws Exception
Sets the cache directory and automatically appends a DIRECTORY_SEPARATOR .