public function cache($path, $lifetime = 3600, $compress = true, $chmod = 0755) {

        // if caching is not explicitly disabled
        if ($path !== false) {

            // if path doesn't exist, attempt to create it
            if (!is_dir($path)) @mkdir($path, $chmod, true);

            // save cache-related properties
            $this->cache = array(
                'path'      =>  $path,
                'lifetime'  =>  $lifetime,
                'chmod'     =>  $chmod,
                'compress'  =>  $compress,
            );

        // if caching is explicitly disabled, set this property to FALSE
        } else $this->cache = false;

    }